Skip to content

Commit

Permalink
fix(plugin-vconsole): prevent duplicate install
Browse files Browse the repository at this point in the history
  • Loading branch information
dlhandsome committed Mar 30, 2020
1 parent 68d12e3 commit e3c557f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/plugin-vconsole/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ const vConsolePlugin = {};
*/

vConsolePlugin.install = function (weDebug, options = {}) {
if (vConsolePlugin.installed) return;
vConsolePlugin.installed = true;

const ruleOption = options.rule || {};

const store = {
vConsoleRuleState: weDebug.createCache('__vConsoleRuleState__')
};
Expand Down Expand Up @@ -34,7 +39,7 @@ vConsolePlugin.install = function (weDebug, options = {}) {
}
}
},
options
ruleOption
)
);

Expand Down

0 comments on commit e3c557f

Please sign in to comment.