Skip to content

Commit 6048c7c

Browse files
committed
fix(FPSMonitor): Guard possible invalid call
1 parent ee3ffd8 commit 6048c7c

File tree

1 file changed

+4
-2
lines changed
  • Sources/Interaction/UI/FPSMonitor

1 file changed

+4
-2
lines changed

Sources/Interaction/UI/FPSMonitor/index.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,10 @@ function vtkFPSMonitor(publicAPI, model) {
107107
// --------------------------------------------------------------------------
108108

109109
publicAPI.update = () => {
110-
model.canvas.setAttribute('width', model.bufferSize);
111-
model.canvas.setAttribute('height', model.graphHeight);
110+
if (model.canvas) {
111+
model.canvas.setAttribute('width', model.bufferSize);
112+
model.canvas.setAttribute('height', model.graphHeight);
113+
}
112114
updateInformations();
113115
publicAPI.render();
114116
};

0 commit comments

Comments
 (0)