Skip to content

Commit

Permalink
Don't use rest syntax in object destructuring
Browse files Browse the repository at this point in the history
It doesn't work before Firefox 55. Fixes #10
  • Loading branch information
Loirooriol committed Aug 11, 2018
1 parent cc1ab34 commit 45211ee
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion windowId-polyfill.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,10 @@ async function windowIdPolyfill(params, windowIdWillAlwaysBeUndefined) {

for (let [key, method] of Object.entries(params)) {
originalMethod[key] = browserAction[method];
browserAction[method] = function({windowId, ...details}) {
browserAction[method] = function(details) {
let {windowId} = details;
if (windowIdWillAlwaysBeUndefined || windowId == null) {
delete details.windowId;
return Reflect.apply(originalMethod[key], browserAction, [details]);
}
let data = windowData.get(windowId);
Expand Down

0 comments on commit 45211ee

Please sign in to comment.