diff --git a/server/controllers/project.controller.js b/server/controllers/project.controller.js index 41b240a0..07554787 100644 --- a/server/controllers/project.controller.js +++ b/server/controllers/project.controller.js @@ -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(); + } }); }