summaryrefslogtreecommitdiff
path: root/src/static/js/html10n.js
diff options
context:
space:
mode:
authorMarcel Klehr <mklehr@gmx.net>2013-04-11 18:51:49 +0300
committerMarcel Klehr <mklehr@gmx.net>2013-04-11 18:51:49 +0300
commit594757cc472bde48aee92043f2103238faeac158 (patch)
tree19c678e466f3d85e6fdd4474644697b302bba199 /src/static/js/html10n.js
parentdf8a31f24186c00e0d5e8a65b2cb81c1cf85b225 (diff)
downloadetherpad-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.js1
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'
}