fixes #850, bundling external libraries was causing a callback to never be called (#1060)

This commit is contained in:
Cassie Tarakajian 2019-05-02 19:33:16 -04:00 committed by GitHub
parent 765ec68ef3
commit df1219b47a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -255,6 +255,10 @@ function bundleExternalLibs(project, zip, callback) {
if (!isUrl(src)) {
numScriptsResolved += 1;
if (numScriptsResolved === numScriptTags) {
indexHtml.content = serializeDocument(document);
callback();
}
return;
}
@ -281,6 +285,10 @@ function bundleExternalLibs(project, zip, callback) {
for (let i = 0; i < numScriptTags; i += 1) {
resolveScriptTagSrc(scriptTags[i], indexHtmlDoc);
}
if (numScriptTags === 0) {
indexHtml.content = serializeDocument(document);
callback();
}
});
}