Skip to content

Commit

Permalink
fix: add else clause in class-list polyfill to work around Edge 15 bug
Browse files Browse the repository at this point in the history
  • Loading branch information
wessberg committed Oct 27, 2020
1 parent 77ea485 commit 998870e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@wessberg/polyfiller",
"version": "0.0.108",
"version": "0.0.109",
"description": "Never worry about polyfills again.",
"files": [
"dist/**/*.*",
Expand Down
8 changes: 6 additions & 2 deletions polyfill-lib/class-list/class-list.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ const defineGetter = function (object, name, fn, configurable) {
configurable: false === dpSupport ? true : !!configurable,
get: fn
});
else object.__defineGetter__(name, fn);
else {
object.__defineGetter__(name, fn);
}
};
/** Ensure the browser allows Object.defineProperty to be used on native JavaScript objects. */
try {
Expand Down Expand Up @@ -51,7 +53,9 @@ const addProp = function (o, name, attr) {
visage || (visage = mirror.appendChild(document.createElement("div")));

tokenList = DOMTokenList.call(visage, THIS, attr);
} else tokenList = new DOMTokenList(THIS, attr);
} else {
tokenList = new DOMTokenList(THIS, attr);
}

defineGetter(THIS, name, function () {
return tokenList;
Expand Down

0 comments on commit 998870e

Please sign in to comment.