Skip to content

Commit f83ca31

Browse files
committed
fix: dev crash
1 parent 907ef6d commit f83ca31

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

template/javascript/build.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ async function processScript(filePath) {
8282
'"use strict";\n\nvar PromisePolyfill = require("promise-polyfill");\nPromise = PromisePolyfill.default;',
8383
);
8484
const promise = bundleModule('promise-polyfill');
85-
waitList.push(promise);
85+
waitList?.push(promise);
8686
}
8787

8888
traverse.default(ast, {
@@ -96,7 +96,7 @@ async function processScript(filePath) {
9696
}
9797

9898
const promise = bundleModule(node.arguments[0].value);
99-
waitList.push(promise);
99+
waitList?.push(promise);
100100
},
101101
});
102102

@@ -169,7 +169,7 @@ async function dev() {
169169
})
170170
.on('add', (filePath) => {
171171
const promise = cb(filePath);
172-
waitList.push(promise);
172+
waitList?.push(promise);
173173
})
174174
.on('change', (filePath) => {
175175
cb(filePath);

template/typescript/build.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ async function processScript(filePath) {
8282
'"use strict";\n\nvar PromisePolyfill = require("promise-polyfill");\nPromise = PromisePolyfill.default;',
8383
);
8484
const promise = bundleModule('promise-polyfill');
85-
waitList.push(promise);
85+
waitList?.push(promise);
8686
}
8787

8888
traverse.default(ast, {
@@ -96,7 +96,7 @@ async function processScript(filePath) {
9696
}
9797

9898
const promise = bundleModule(node.arguments[0].value);
99-
waitList.push(promise);
99+
waitList?.push(promise);
100100
},
101101
});
102102

@@ -169,7 +169,7 @@ async function dev() {
169169
})
170170
.on('add', (filePath) => {
171171
const promise = cb(filePath);
172-
waitList.push(promise);
172+
waitList?.push(promise);
173173
})
174174
.on('change', (filePath) => {
175175
cb(filePath);

0 commit comments

Comments
 (0)