Skip to content

Commit d09dbb3

Browse files
authored
fix(CR-317): player crushes on reload (#985)
### Description of the Changes bugfix, regression from [fix](#982). **Issue:** player crushes when executing `updatePlayerClientRect` with an undefined `playerContainer`. **Fix:** execute `updatePlayerClientRect` only if `playerContainer` exists. #### Resolves CR-317
1 parent 387f45c commit d09dbb3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/components/shell/shell.tsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,9 @@ class Shell extends Component<any, any> {
263263
this.props.updatePlayerClientRect(playerContainer.getBoundingClientRect());
264264
}
265265
setTimeout(() => {
266-
this.props.updatePlayerClientRect(playerContainer?.getBoundingClientRect());
266+
if (playerContainer) {
267+
this.props.updatePlayerClientRect(playerContainer.getBoundingClientRect());
268+
}
267269
}, ON_PLAYER_RECT_CHANGE_DEBOUNCE_DELAY);
268270
};
269271

0 commit comments

Comments
 (0)