Skip to content

Commit

Permalink
Fix File not inheriting from Blob (#160)
Browse files Browse the repository at this point in the history
  • Loading branch information
weizman authored Sep 25, 2024
1 parent ecf1add commit 476409e
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"@wdio/mocha-framework": "^7.5.3",
"@wdio/spec-reporter": "^7.5.3",
"babel-loader": "^8.2.2",
"chromedriver": "^118.0.0",
"chromedriver": "^129.0.0",
"geckodriver": "^3.2.0",
"wdio-chromedriver-service": "7.0.0",
"wdio-safaridriver-service": "^2.0.0",
Expand Down
3 changes: 2 additions & 1 deletion snow.js
Original file line number Diff line number Diff line change
Expand Up @@ -1207,6 +1207,7 @@ function hookFile(win) {
}
// to pass 'File.prototype.isPrototypeOf(f)' test (https://github.com/LavaMoat/snow/issues/87#issue-1751534810)
Object.setPrototypeOf(native.prototype, File.prototype);
Object.setPrototypeOf(File.prototype, win[BLOB].prototype);
win[FILE] = File;
Object.defineProperty(native.prototype, 'constructor', {
value: File
Expand Down Expand Up @@ -1251,8 +1252,8 @@ function hook(win) {
}
function hookCreateObjectURL(win) {
hook(win);
hookBlob(win);
hookFile(win);
hookBlob(win);
hookMediaSource(win);
}
module.exports = hookCreateObjectURL;
Expand Down
Loading

0 comments on commit 476409e

Please sign in to comment.