diff options
author | Alexander Sulfrian <alexander@sulfrian.net> | 2016-07-19 02:17:15 +0200 |
---|---|---|
committer | Maxime Quandalle <maxime@quandalle.com> | 2016-07-19 02:17:15 +0200 |
commit | 43f3a2f3d50c60663ced015ba838b3e71e98910d (patch) | |
tree | b48f63f99721865a6a0629db62d0ca5c16900550 /client/config/gecko-fix.js | |
parent | 952c2e1ae22261ba7d6919b3279c3bc5c80c7018 (diff) | |
download | wekan-43f3a2f3d50c60663ced015ba838b3e71e98910d.tar.gz wekan-43f3a2f3d50c60663ced015ba838b3e71e98910d.tar.bz2 wekan-43f3a2f3d50c60663ced015ba838b3e71e98910d.zip |
Fix untranslated watch/unwatch for gecko (#606)
In the Gecko JavaScript engine the Object prototype has a method
'watch()' and 'unwatch()'. This causes strange error messages displayed,
if 'watch' and 'unwatch' are not translated in the chosen localization.
The i18n module cannot handle, if it gets a function for the
translation.
This is a quick fix that removes the 'watch' and 'unwatch' properties
from the Object prototype.
See also: https://developer.mozilla.org/de/docs/Web/JavaScript/Reference/Global_Objects/Object/watch
Diffstat (limited to 'client/config/gecko-fix.js')
-rw-r--r-- | client/config/gecko-fix.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/client/config/gecko-fix.js b/client/config/gecko-fix.js new file mode 100644 index 00000000..00e28970 --- /dev/null +++ b/client/config/gecko-fix.js @@ -0,0 +1,4 @@ +if (Object.prototype.hasOwnProperty('watch')) { + Object.prototype.watch = undefined; + Object.prototype.unwatch = undefined; +} |