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

Commit

Permalink
fix failing test (Property length of object returned by SupportedLoca…
Browse files Browse the repository at this point in the history
…les is writable) (#298)
  • Loading branch information
jstafford authored and caridy committed Feb 2, 2018
1 parent dd854c6 commit 4bd382c
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/9.negotiation.js
Expand Up @@ -607,8 +607,16 @@ export function /*9.2.8 */SupportedLocales (availableLocales, requestedLocales,
writable: false, configurable: false, value: subset[P]
});
}

// 5. Return subset

// 5. repeat the above operation for the length property,
// since length is not enumerable in a List.
// This is by design as it matches the behavior of Array.
defineProperty(subset, 'length', {
writable: false, configurable: false, value: subset.length
});


// 6. Return subset
return subset;
}

Expand Down

0 comments on commit 4bd382c

Please sign in to comment.