From b58514f42730cd40fe4d5c3781384cb8f9af9223 Mon Sep 17 00:00:00 2001 From: Matthew Hodgson Date: Tue, 14 Nov 2017 14:27:27 +0000 Subject: [PATCH] Stop FF quantum exploding on CSS edits --- src/Tinter.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/Tinter.js b/src/Tinter.js index fe4cafe744..be894f003b 100644 --- a/src/Tinter.js +++ b/src/Tinter.js @@ -279,7 +279,15 @@ class Tinter { " fixups)"); for (let i = 0; i < this.cssFixups[this.theme].length; i++) { const cssFixup = this.cssFixups[this.theme][i]; - cssFixup.style[cssFixup.attr] = this.colors[cssFixup.index]; + try { + cssFixup.style[cssFixup.attr] = this.colors[cssFixup.index]; + } + catch (e) { + // Firefox Quantum explodes if you manually edit the CSS in the + // inspector and then try to do a tint, as apparently all the + // fixups are then stale. + console.error("Failed to apply cssFixup in Tinter! ", e.name); + } } if (DEBUG) console.log("applyCssFixups end"); }