diff --git a/msgbox/msgbox.js b/msgbox/msgbox.js index 01a4fdf9..b52c9964 100644 --- a/msgbox/msgbox.js +++ b/msgbox/msgbox.js @@ -113,9 +113,10 @@ function messageBox({ buttons.map((content, buttonIndex) => content && $create('button', Object.assign({ buttonIndex, - textContent: typeof content === 'object' ? '' : content, onclick: messageBox.listeners.button, - }, typeof content === 'object' && content)))), + }, typeof content === 'object' ? content : { + textContent: content, + })))), ]), ]); }