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

@ -142,7 +142,9 @@ export const ModelingMachineProvider = ({
kclManager.executeCode().then(() => {
if (engineCommandManager.engineConnection?.idleMode) return
store.videoElement?.play()
store.videoElement?.play().catch((e) => {
console.warn('Video playing was prevented', e)
})
})
})()
},