From 0440073853d7530ae605d56f3ba1e4a27c3200d5 Mon Sep 17 00:00:00 2001 From: tophf Date: Tue, 23 May 2017 22:28:45 +0300 Subject: [PATCH] restore style code in popup::onMessage --- popup.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/popup.js b/popup.js index 9ac807be..fde184bf 100644 --- a/popup.js +++ b/popup.js @@ -22,7 +22,9 @@ function onRuntimeMessage(msg) { switch (msg.method) { case 'styleAdded': case 'styleUpdated': - handleUpdate(msg.style); + // notifyAllTabs sets msg.style's code to null so we have to get the actual style + // because we analyze its code in detectSloppyRegexps + handleUpdate(BG.cachedStyles.byId.get(msg.style.id)); break; case 'styleDeleted': handleDelete(msg.id);