Skip to content

Commit

Permalink
fix: use original function for Intl.ListFormat.supportedLocalesOf (#530)
Browse files Browse the repository at this point in the history
  • Loading branch information
sereneblue committed Apr 15, 2022
1 parent 748800e commit a334204
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/lib/inject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,7 @@ class Injector {
let ORIGINAL_INTL_PROTO = spoofContext.Intl.DateTimeFormat.prototype;
let _supportedLocalesOfDTF = spoofContext.Intl.DateTimeFormat.supportedLocalesOf;
let _supportedLocalesOfRTF = spoofContext.Intl.RelativeTimeFormat.supportedLocalesOf;
let _supportedLocalesOfLF = spoofContext.Intl.ListFormat.supportedLocalesOf;
let _supportedLocalesOfNF = spoofContext.Intl.NumberFormat.supportedLocalesOf;
let _supportedLocalesOfPR = spoofContext.Intl.PluralRules.supportedLocalesOf;
let _supportedLocalesOfC = spoofContext.Intl.Collator.supportedLocalesOf;
Expand Down Expand Up @@ -497,6 +498,7 @@ class Injector {
spoofContext.Intl.RelativeTimeFormat.supportedLocalesOf = _supportedLocalesOfRTF;
spoofContext.Intl.NumberFormat.supportedLocalesOf = _supportedLocalesOfNF;
spoofContext.Intl.PluralRules.supportedLocalesOf = _supportedLocalesOfPR;
spoofContext.Intl.ListFormat.supportedLocalesOf = _supportedLocalesOfLF;
spoofContext.Intl.Collator.supportedLocalesOf = _supportedLocalesOfC;
spoofContext.open = function(){
Expand Down

0 comments on commit a334204

Please sign in to comment.