fix(ui): skip scaling if no screen manager in state

This commit is contained in:
nick-delirium 2023-04-07 09:53:36 +02:00 committed by Shekar Siri
parent f4dba95a7a
commit 3d488ded13

View file

@ -78,8 +78,10 @@ export default class WebPlayer extends Player {
scale = () => {
const { width, height } = this.wpState.get()
this.screen.scale({ width, height })
this.inspectorController.scale({ width, height })
if (!this.screen && !this.inspectorController) return;
// sometimes happens in live assist sessions for some reason
this.screen?.scale?.({ width, height })
this.inspectorController?.scale?.({ width, height })
this.targetMarker.updateMarkedTargets()
}