Skip to content

Commit

Permalink
Fix another unsafe property assignment in Polymer.
Browse files Browse the repository at this point in the history
In polymer.dom.js, we stick __domApi on nodes, but we don't prevent that
property from being renamed when compiled. It seems that the renamed
property can sometimes collide in a bad way with some other unsafe
property we stick on nodes in the polyfill (not sure which yet).
  • Loading branch information
aomarks committed Oct 31, 2018
1 parent 1ad496f commit 3ee4eb9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/legacy/polymer.dom.js
Original file line number Diff line number Diff line change
Expand Up @@ -401,14 +401,14 @@ forwardProperties(DomApi.prototype, [
*/
export const dom = function(obj) {
obj = obj || document;
if (!obj.__domApi) {
if (!obj['__domApi']) {
let helper;
if (obj instanceof Event) {
helper = new EventApi(obj);
} else {
helper = new DomApi(obj);
}
obj.__domApi = helper;
obj['__domApi'] = helper;
}
return obj.__domApi;
return obj['__domApi'];
};

0 comments on commit 3ee4eb9

Please sign in to comment.