From: Evan You Date: Tue, 30 Mar 2021 16:49:50 +0000 (-0400) Subject: workflow(sfc-playground): clear errors in edge cases X-Git-Tag: v3.0.10~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6cab91dfe84d131e4fb8c911dd4f522433daf497;p=thirdparty%2Fvuejs%2Fcore.git workflow(sfc-playground): clear errors in edge cases --- diff --git a/packages/sfc-playground/src/sfcCompiler.ts b/packages/sfc-playground/src/sfcCompiler.ts index 79a088c09c..15b24e4c02 100644 --- a/packages/sfc-playground/src/sfcCompiler.ts +++ b/packages/sfc-playground/src/sfcCompiler.ts @@ -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 }