Enabling a style overwrites 'Add Style' content with enabled style #174
This commit is contained in:
parent
b9cec8d4f6
commit
a5e3a1e3dd
4
edit.js
4
edit.js
|
@ -1616,12 +1616,12 @@ function getParams() {
|
||||||
chrome.runtime.onMessage.addListener(function(request, sender, sendResponse) {
|
chrome.runtime.onMessage.addListener(function(request, sender, sendResponse) {
|
||||||
switch (request.method) {
|
switch (request.method) {
|
||||||
case "styleUpdated":
|
case "styleUpdated":
|
||||||
if (styleId == request.id) {
|
if (styleId && styleId == request.style.id) {
|
||||||
initWithStyle(request.style);
|
initWithStyle(request.style);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "styleDeleted":
|
case "styleDeleted":
|
||||||
if (styleId == request.id) {
|
if (styleId && styleId == request.style.id) {
|
||||||
window.close();
|
window.close();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user