l10n: actually stop observing

This commit is contained in:
tophf 2017-12-20 08:37:57 +03:00
parent e9a2cb92e3
commit 2d12bfd1f5

View File

@ -182,8 +182,9 @@ function tDocLoader() {
} }
function onLoad() { function onLoad() {
tDocLoader.stop(); document.removeEventListener('DOMContentLoaded', onLoad);
process(tDocLoader.observer.takeRecords()); process(tDocLoader.observer.takeRecords());
tDocLoader.stop();
if (cacheLength !== Object.keys(t.cache).length) { if (cacheLength !== Object.keys(t.cache).length) {
localStorage.L10N = JSON.stringify(t.cache); localStorage.L10N = JSON.stringify(t.cache);
} }