restore style code in popup::onMessage

This commit is contained in:
tophf 2017-05-23 22:28:45 +03:00
parent 8e6006e705
commit 0440073853

View File

@ -22,7 +22,9 @@ function onRuntimeMessage(msg) {
switch (msg.method) { switch (msg.method) {
case 'styleAdded': case 'styleAdded':
case 'styleUpdated': 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; break;
case 'styleDeleted': case 'styleDeleted':
handleDelete(msg.id); handleDelete(msg.id);