Skip to content

Commit 1e6b931

Browse files
committed
feat: no call when no plugin
1 parent 4218f07 commit 1e6b931

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

.npmignore

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,7 @@ alfa
1616
.babel*
1717
.browserslistrc
1818
.eslint*
19-
babel.config.js
20-
jest.config.js
21-
rollup.config.js
19+
*.config.js
2220

2321
# misc
2422
.DS_Store

src/vm.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ export default class VM {
1616
call.cb(data.error, data.result)
1717
}
1818
})
19-
this._plugin = this._call('plugin', this.options.plugins)
19+
this._plugin = this.options.plugins.length
20+
? this._call('plugin', this.options.plugins)
21+
: Promise.resolve()
2022
}
2123

2224
_call(fn, ...args) {

0 commit comments

Comments
 (0)