From a5e3a1e3dd51282f72589a4608a8e6a66541f3f6 Mon Sep 17 00:00:00 2001 From: Jason Date: Fri, 3 Jun 2016 22:03:08 -0500 Subject: [PATCH] Enabling a style overwrites 'Add Style' content with enabled style #174 --- edit.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/edit.js b/edit.js index 318f4f68..5a2ad1ae 100644 --- a/edit.js +++ b/edit.js @@ -1616,12 +1616,12 @@ function getParams() { chrome.runtime.onMessage.addListener(function(request, sender, sendResponse) { switch (request.method) { case "styleUpdated": - if (styleId == request.id) { + if (styleId && styleId == request.style.id) { initWithStyle(request.style); } break; case "styleDeleted": - if (styleId == request.id) { + if (styleId && styleId == request.style.id) { window.close(); break; }