Skip to content

Commit

Permalink
workflow(sfc-playground): clear errors in edge cases
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Mar 30, 2021
1 parent b6298db commit 6cab91d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/sfc-playground/src/sfcCompiler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,13 @@ export const SANDBOX_VUE_URL = import.meta.env.PROD

export async function compileFile({ filename, code, compiled }: File) {
if (!code.trim()) {
store.errors = []
return
}

if (filename.endsWith('.js')) {
compiled.js = compiled.ssr = code
store.errors = []
return
}

Expand Down

0 comments on commit 6cab91d

Please sign in to comment.