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.
This commit is contained in:
parent
31537b1910
commit
49c33b4eea
@ -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');
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user