Skip to content
This repository was archived by the owner on Apr 14, 2021. It is now read-only.

Commit 4bd382c

Browse files
jstaffordcaridy
authored andcommitted
fix failing test (Property length of object returned by SupportedLocales is writable) (#298)
1 parent dd854c6 commit 4bd382c

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/9.negotiation.js

+10-2
Original file line numberDiff line numberDiff line change
@@ -607,8 +607,16 @@ export function /*9.2.8 */SupportedLocales (availableLocales, requestedLocales,
607607
writable: false, configurable: false, value: subset[P]
608608
});
609609
}
610-
611-
// 5. Return subset
610+
611+
// 5. repeat the above operation for the length property,
612+
// since length is not enumerable in a List.
613+
// This is by design as it matches the behavior of Array.
614+
defineProperty(subset, 'length', {
615+
writable: false, configurable: false, value: subset.length
616+
});
617+
618+
619+
// 6. Return subset
612620
return subset;
613621
}
614622

0 commit comments

Comments
 (0)