Commit c326c8af2a729760e833b861163acade71770ff5
don't create imports of there is no code
wanderer committed on 11/5/2016, 11:30:23 AMParent: 277b81fa0326007d061917f6ea1efa15f8ad5392
Files changed
index.js | changed |
index.js | ||
---|---|---|
@@ -8,12 +8,14 @@ | ||
8 | 8 | constructor (opts = {}) { |
9 | 9 | this.state = opts.state || new Vertex() |
10 | 10 | this.parent = opts.parent |
11 | 11 | |
12 | + // if code is bound to this kernel then create the interfaceAPI and the | |
13 | + // imports | |
12 | 14 | if (opts.code) { |
13 | 15 | this.interfaceAPI = new InterfaceAPI(opts.code) |
16 | + this.imports = this.buildImports(opts.interfaces) | |
14 | 17 | } |
15 | - this.imports = this.buildImports(opts.interfaces) | |
16 | 18 | } |
17 | 19 | |
18 | 20 | /** |
19 | 21 | * Builds a import map with an array of given interfaces |
Built with git-ssb-web