fix toggleHpTools to support split primary button (#3900)

Fixes a small bug in toggling buttons with hanging protocols.
This commit is contained in:
m00n620 2024-01-22 15:42:51 -05:00 committed by GitHub
parent ed2bf23cd2
commit ef46b5a704
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -121,7 +121,10 @@ const commandsModule = ({
if (!button.id) {
return;
}
const { commands, items } = button.props || button;
const { commands, items, primary } = button.props || button;
if (primary) {
enableListener(primary);
}
if (items) {
items.forEach(enableListener);
}