From ff9e37ec5f5caae039b1c7d0b70614b4e86e5b4a Mon Sep 17 00:00:00 2001 From: tophf Date: Thu, 12 Apr 2018 21:02:02 +0300 Subject: [PATCH] messageBox: keep children specified via appendChild in buttons --- msgbox/msgbox.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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, + })))), ]), ]); }