Skip to content

Commit a756b85

Browse files
committed
lib: improve argument handling in Blob constructor
As specified in WebIDL (<https://webidl.spec.whatwg.org/#js-dictionary>), the fields of a dictionary need to be read in lexicographical order.
1 parent e0375be commit a756b85

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

lib/internal/blob.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,8 @@ class Blob {
149149
}
150150
validateDictionary(options, 'options');
151151
let {
152-
type = '',
153152
endings = 'transparent',
153+
type = '',
154154
} = options ?? kEmptyObject;
155155

156156
endings = `${endings}`;

test/wpt/status/FileAPI/blob.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
"blobParts not an object: BigInt with BigInt.prototype[Symbol.iterator]",
1111
"blobParts not an object: Symbol with Symbol.prototype[Symbol.iterator]",
1212
"Getters and value conversions should happen in order until an exception is thrown.",
13-
"options properties should be accessed in lexicographic order.",
1413
"Arguments should be evaluated from left to right."
1514
],
1615
"flaky": [

0 commit comments

Comments
 (0)