Skip to content

Commit 94b9edb

Browse files
committed
fix c57754d for messageBox buttons
1 parent 83e409b commit 94b9edb

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/js/dlg/message-box.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -169,10 +169,7 @@ messageBox.show = ({
169169
$create('i.i-close')),
170170
$create(`#${id}-contents`, tHTML(contents)),
171171
$create(`#${id}-buttons`, buttons.filter(Boolean).map((btn, buttonIndex) => {
172-
if (btn.localName !== 'button') {
173-
const obj = typeof btn === 'object' && btn;
174-
btn = $create('button', obj, (!obj || btn instanceof Node) && btn);
175-
}
172+
if (btn.localName !== 'button') btn = $create('button', btn);
176173
btn.buttonIndex = buttonIndex;
177174
btn.onclick ??= messageBox.listeners.button;
178175
return btn;

0 commit comments

Comments
 (0)