From 3578698a86195a5ab91188f91269c6772f689adb Mon Sep 17 00:00:00 2001 From: Samuel Elliott Date: Fri, 9 Mar 2018 01:26:45 +0000 Subject: [PATCH] Fix deleting all injected styles --- client/src/modules/pluginapi.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/client/src/modules/pluginapi.js b/client/src/modules/pluginapi.js index f5b0a023..b95c84b9 100644 --- a/client/src/modules/pluginapi.js +++ b/client/src/modules/pluginapi.js @@ -190,8 +190,8 @@ export default class PluginApi { injectStyle(id, css) { if (id && !css) css = id, id = undefined; this.deleteStyle(id); - const styleid = `plugin-${this.getPlugin().id}-${id}`; - this.injectedStyles.push(styleid); + const styleid = `plugin-${this.plugin.id}-${id}`; + this.injectedStyles.push(id); DOM.injectStyle(css, styleid); } async injectSass(id, scss, options) { @@ -201,7 +201,7 @@ export default class PluginApi { this.injectStyle(id, css, options); } deleteStyle(id) { - const styleid = `plugin-${this.getPlugin().id}-${id}`; + const styleid = `plugin-${this.plugin.id}-${id}`; this.injectedStyles.splice(this.injectedStyles.indexOf(styleid), 1); DOM.deleteStyle(styleid); }