From 49c33b4eeaf409a423292531ce66744a53046ecb Mon Sep 17 00:00:00 2001 From: Arthurk12 Date: Fri, 16 Feb 2024 15:56:07 -0300 Subject: [PATCH] fix(whiteboard): check before manipulating pan tool class list Since the pan tool is only available for the presenter, it has to be checked whether it actually exists before attempting to modify its class list. --- .../imports/ui/components/whiteboard/component.jsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/bigbluebutton-html5/imports/ui/components/whiteboard/component.jsx b/bigbluebutton-html5/imports/ui/components/whiteboard/component.jsx index 92e5617f73..c92665b6e4 100644 --- a/bigbluebutton-html5/imports/ui/components/whiteboard/component.jsx +++ b/bigbluebutton-html5/imports/ui/components/whiteboard/component.jsx @@ -145,8 +145,11 @@ export default function Whiteboard(props) { } else { setIsPanning(false); setPanSelected(false); - panButton.classList.add('selectOverride'); - panButton.classList.remove('select'); + if (panButton) { + // only presenter has the pan button + panButton.classList.add('selectOverride'); + panButton.classList.remove('select'); + } } };