diff --git a/js/translator.js b/js/translator.js index 34bbb717..fe9d0ec0 100644 --- a/js/translator.js +++ b/js/translator.js @@ -126,6 +126,9 @@ var Translator = (function() { // variables: {timeToWait: "2 hours", work: "painting"} // to: "Please wait for 2 hours before continuing with painting." function createStringFromTemplate(template, variables) { + if(Object.prototype.toString.call(template) !== "[object String]") { + return template; + } if(variables.fallback && !template.match(new RegExp("\{.+\}"))) { template = variables.fallback; }