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 Delirium
parent 51003165cc
commit 5954979e86

View file

@ -93,8 +93,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()
}