fix code not executing tauri project load (#2165)

Signed-off-by: Jess Frazelle <github@jessfraz.com>
This commit is contained in:
Jess Frazelle
2024-04-18 12:40:05 -07:00
committed by GitHub
parent ac140c054f
commit 38d9b5d4b4
3 changed files with 14 additions and 1 deletions

View File

@ -259,7 +259,11 @@ export class KclManager {
executeCode(force?: boolean) {
// If we want to force it we don't want to defer it.
if (!force) return this._defferer(codeManager.code)
return this.executeAst()
const ast = this.safeParse(codeManager.code)
if (!ast) return
this.ast = { ...ast }
return this.executeAst(ast)
}
format() {
const originalCode = codeManager.code