From: Tim Düsterhus Date: Sun, 21 Apr 2013 10:32:56 +0000 (+0200) Subject: Fix value === null in WCF.Language.get X-Git-Tag: 2.0.0_Beta_1~298^2~16 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=8a236dffc559791dc7dd8349a4a1aa76a5f25db1;p=GitHub%2FWoltLab%2FWCF.git Fix value === null in WCF.Language.get --- diff --git a/wcfsetup/install/files/js/WCF.js b/wcfsetup/install/files/js/WCF.js index 9b4b5eaa94..3e00eb4305 100755 --- a/wcfsetup/install/files/js/WCF.js +++ b/wcfsetup/install/files/js/WCF.js @@ -2558,7 +2558,11 @@ WCF.Language = { var value = this._variables.get(key); - if (typeof value === 'string') { + if (value === null) { + // return key again + return key; + } + else if (typeof value === 'string') { // transform strings into template and try to refetch this.add(key, new WCF.Template(value)); return this.get(key, parameters); @@ -2567,10 +2571,6 @@ WCF.Language = { // evaluate templates value = value.fetch(parameters); } - else if (value === null) { - // return key again - return key; - } return value; }