mirror of
https://github.com/Ionaru/easy-markdown-editor
synced 2025-07-23 01:44:31 -06:00
Add hasOwnProperty check
This commit is contained in:
parent
1c656d5712
commit
565c42e0ff
@ -239,7 +239,9 @@ function createToolbarButton(options, enableActions, enableTooltips, shortcuts,
|
||||
|
||||
if (options.attributes) {
|
||||
for (var attribute in options.attributes) {
|
||||
el.setAttribute(attribute, options.attributes[attribute]);
|
||||
if (Object.prototype.hasOwnProperty.call(options.attributes, attribute)) {
|
||||
el.setAttribute(attribute, options.attributes[attribute]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user