Fix custom buttons disappearing in Guide Menu (#551)

This commit is contained in:
redphx
2024-11-06 07:36:32 +07:00
parent 57686f9d8e
commit fce8af4b3b
4 changed files with 21 additions and 8 deletions

View File

@@ -79,7 +79,7 @@ export class RootDialogObserver {
BX_FLAGS.Debug && BxLogger.warning('RootDialog', 'added', mutation.addedNodes);
if (mutation.addedNodes.length === 1) {
const $addedElm = mutation.addedNodes[0];
if ($addedElm instanceof HTMLElement && $addedElm.className) {
if ($addedElm instanceof HTMLElement) {
RootDialogObserver.handleAddedElement($root, $addedElm);
}
}