workflow(sfc-playground): clear errors in edge cases
This commit is contained in:
parent
b6298dbd01
commit
6cab91dfe8
@ -19,11 +19,13 @@ export const SANDBOX_VUE_URL = import.meta.env.PROD
|
|||||||
|
|
||||||
export async function compileFile({ filename, code, compiled }: File) {
|
export async function compileFile({ filename, code, compiled }: File) {
|
||||||
if (!code.trim()) {
|
if (!code.trim()) {
|
||||||
|
store.errors = []
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if (filename.endsWith('.js')) {
|
if (filename.endsWith('.js')) {
|
||||||
compiled.js = compiled.ssr = code
|
compiled.js = compiled.ssr = code
|
||||||
|
store.errors = []
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user