Skip to content

Commit

Permalink
Merge pull request #1618 from developit/bug/fix-self-ref-for-non-browser
Browse files Browse the repository at this point in the history
(fix) Self is not available in non-browser env
  • Loading branch information
cristianbote committed May 10, 2019
2 parents a23b921 + a601e40 commit c4c7a46
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/diff/props.js
Expand Up @@ -76,7 +76,7 @@ function setProperty(dom, name, value, oldValue, isSvg) {
else if (name[0]==='o' && name[1]==='n') {
let useCapture = name !== (name=name.replace(/Capture$/, ''));
let nameLower = name.toLowerCase();
name = (nameLower in self ? nameLower : name).substring(2);
name = (nameLower in dom.ownerDocument.defaultView ? nameLower : name).slice(2);

if (value) {
if (!oldValue) dom.addEventListener(name, eventProxy, useCapture);
Expand Down

0 comments on commit c4c7a46

Please sign in to comment.