diff options
author | Marcel Klehr <mklehr@gmx.net> | 2013-04-11 18:51:49 +0300 |
---|---|---|
committer | Marcel Klehr <mklehr@gmx.net> | 2013-04-11 18:51:49 +0300 |
commit | 594757cc472bde48aee92043f2103238faeac158 (patch) | |
tree | 19c678e466f3d85e6fdd4474644697b302bba199 /src/static/js/html10n.js | |
parent | df8a31f24186c00e0d5e8a65b2cb81c1cf85b225 (diff) | |
download | etherpad-lite-594757cc472bde48aee92043f2103238faeac158.zip |
html10n.js: Don't break in getDirection if language hasn't been set
fixes #1724
Diffstat (limited to 'src/static/js/html10n.js')
-rw-r--r-- | src/static/js/html10n.js | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/static/js/html10n.js b/src/static/js/html10n.js index 90f84ff9..e1c884cd 100644 --- a/src/static/js/html10n.js +++ b/src/static/js/html10n.js @@ -900,6 +900,7 @@ window.html10n = (function(window, document, undefined) { * Returns the direction of the language returned be html10n#getLanguage */ html10n.getDirection = function() { + if(!this.language) return var langCode = this.language.indexOf('-') == -1? this.language : this.language.substr(0, this.language.indexOf('-')) return html10n.rtl.indexOf(langCode) == -1? 'ltr' : 'rtl' } |