Skip to content

Commit bc006eb

Browse files
authored
Fix potential undefined deck in FPS calculation (#9800)
1 parent 15f2330 commit bc006eb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/widgets/src/fps-widget.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,6 @@ export class FpsWidget extends Widget<FpsWidgetProps> {
7272

7373
_getFps(): number {
7474
// @ts-expect-error protected
75-
return Math.round(this.deck.metrics.fps ?? 0);
75+
return Math.round(this.deck?.metrics.fps ?? 0);
7676
}
7777
}

0 commit comments

Comments
 (0)