Skip to content

Commit 6cab91d

Browse files
committed
workflow(sfc-playground): clear errors in edge cases
1 parent b6298db commit 6cab91d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

packages/sfc-playground/src/sfcCompiler.ts

+2
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,13 @@ export const SANDBOX_VUE_URL = import.meta.env.PROD
1919

2020
export async function compileFile({ filename, code, compiled }: File) {
2121
if (!code.trim()) {
22+
store.errors = []
2223
return
2324
}
2425

2526
if (filename.endsWith('.js')) {
2627
compiled.js = compiled.ssr = code
28+
store.errors = []
2729
return
2830
}
2931

0 commit comments

Comments
 (0)