From 825fd00a8038cd5a8e55466d9bfbca4163459a9c Mon Sep 17 00:00:00 2001 From: tophf Date: Sun, 7 Jan 2018 12:50:17 +0300 Subject: [PATCH] fixes for FF52 --- content/apply.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/content/apply.js b/content/apply.js index f715bfc0..03df8327 100644 --- a/content/apply.js +++ b/content/apply.js @@ -423,7 +423,7 @@ if (sort && sortStyleMap()) { sortStyleElements(); } - if (!observing && ROOT) { + if (!observing && ROOT && docRootObserver) { docRootObserver.observe(ROOT, {childList: true}); observing = true; } @@ -494,7 +494,7 @@ } if (sorting) { sorting = false; - docRootObserver.takeRecords(); + if (docRootObserver) docRootObserver.takeRecords(); if (!restorationLimitExceeded()) { start(); } else { @@ -515,7 +515,7 @@ function moveAfter(el, expected) { if (!sorting) { sorting = true; - docRootObserver.stop(); + if (docRootObserver) docRootObserver.stop(); } expected.insertAdjacentElement('afterend', el); if (el.disabled !== disableAll) {