WCF.Language.get returns the key when the language item is not found
authorTim Düsterhus <timwolla@arcor.de>
Mon, 30 Jan 2012 13:33:47 +0000 (14:33 +0100)
committerTim Düsterhus <timwolla@arcor.de>
Mon, 30 Jan 2012 13:33:47 +0000 (14:33 +0100)
This is a consistent behaviour to the PHP code

wcfsetup/install/files/js/WCF.js

index 8fad51d2e6b0374316d8a6653371b62e38c03890..bc3364feda1de91749781de3cb52f1e59e78bafd 100644 (file)
@@ -1683,6 +1683,10 @@ WCF.Language = {
                        // evaluate templates
                        value = value.fetch(parameters);
                }
+               else if (value === null) {
+                       // return key again
+                       return key;
+               }
                
                return value;
        }