Skip to content

Commit

Permalink
breaking for if culture found
Browse files Browse the repository at this point in the history
  • Loading branch information
LuisMerinoP committed Aug 15, 2023
1 parent 68a2487 commit ced17c5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Jint/Native/Number/NumberPrototype.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,11 @@ private JsValue ToLocaleString(JsValue thisObject, JsValue[] arguments)
var cultureArg = arguments[0].ToString();
for (int i = 0; i < systemCultures.Length - 1; i++)
{
cultureInfo = systemCultures[i] == cultureArg ? new CultureInfo(systemCultures[i]) : cultureInfo;
if (systemCultures[i] == cultureArg)
{
cultureInfo = new CultureInfo(systemCultures[i]);
break;
}
}
}

Expand Down

0 comments on commit ced17c5

Please sign in to comment.