We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fec54fc commit e41f883Copy full SHA for e41f883
packages/app/src/sandbox/compile.js
@@ -41,7 +41,7 @@ export function getCurrentManager(): ?Manager {
41
return manager;
42
}
43
44
-export function getHTMLParts(html: string = '') {
+export function getHTMLParts(html: string) {
45
if (html.includes('<body>')) {
46
const bodyMatcher = /<body>([\s\S]*)<\/body>/m;
47
const headMatcher = /<head>([\s\S]*)<\/head>/m;
@@ -469,7 +469,7 @@ async function compile({
469
const htmlModule = modules[htmlModulePath];
470
471
const { head, body } = getHTMLParts(
472
- htmlModule
+ htmlModule && htmlModule.code
473
? htmlModule.code
474
: template === 'vue-cli'
475
? '<div id="app"></div>'
0 commit comments