Bug fix: prevent KCL error due to colliding AST execution on project switch (#3205)

* Only run "Execute AST" action if defaultUnit setting changes

* A little more logging and catching anywhere we call video.play()
This commit is contained in:
Frank Noirot
2024-08-01 01:40:14 -04:00
committed by GitHub
parent 41b1ec94fa
commit 1ac39d95f2
5 changed files with 55 additions and 10 deletions

View File

@ -1082,7 +1082,9 @@ export const modelingMachine = createMachine(
},
})
if (!engineCommandManager.engineConnection?.idleMode) {
store.videoElement?.play()
store.videoElement?.play().catch((e) => {
console.warn('Video playing was prevented', e)
})
}
if (updatedAst?.selections) {
editorManager.selectRange(updatedAst?.selections)