Skip to content

Commit

Permalink
fix #1445
Browse files Browse the repository at this point in the history
Firefox has object method named watch. Would affect other attribute
names that happen to be the same as native object methods.
  • Loading branch information
jhchen committed May 28, 2017
1 parent 9dc3b58 commit e54a07f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions modules/clipboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -216,11 +216,12 @@ function matchAttributor(node, delta) {
formats[attr.attrName] = attr.value(node);
if (formats[attr.attrName]) return;
}
if (ATTRIBUTE_ATTRIBUTORS[name] != null) {
attr = ATTRIBUTE_ATTRIBUTORS[name];
attr = ATTRIBUTE_ATTRIBUTORS[name];
if (attr != null && attr.attrName === name) {
formats[attr.attrName] = attr.value(node) || undefined;
}
if (STYLE_ATTRIBUTORS[name] != null) {
attr = STYLE_ATTRIBUTORS[name]
if (attr != null && attr.attrName === name) {
attr = STYLE_ATTRIBUTORS[name];
formats[attr.attrName] = attr.value(node) || undefined;
}
Expand Down

0 comments on commit e54a07f

Please sign in to comment.