Skip to content

Commit

Permalink
Merge pull request Polymer#5419 from Polymer/bad-dom-api-property
Browse files Browse the repository at this point in the history
Fix another unsafe property assignment in Polymer.
  • Loading branch information
dfreedm authored Nov 2, 2018
2 parents 1ad496f + 3ee4eb9 commit 3a890b9
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 3a890b9

Please sign in to comment.