2
0
mirror of https://github.com/Ionaru/easy-markdown-editor synced 2025-07-23 09:54:28 -06:00

Add hasOwnProperty check

This commit is contained in:
Jeroen Akkerman 2022-01-11 21:28:22 +01:00
parent 1c656d5712
commit 565c42e0ff

View File

@ -239,9 +239,11 @@ function createToolbarButton(options, enableActions, enableTooltips, shortcuts,
if (options.attributes) {
for (var attribute in options.attributes) {
if (Object.prototype.hasOwnProperty.call(options.attributes, attribute)) {
el.setAttribute(attribute, options.attributes[attribute]);
}
}
}
if (options.noDisable) {
el.classList.add('no-disable');