diff --git a/Jint/Native/Number/NumberPrototype.cs b/Jint/Native/Number/NumberPrototype.cs index bbccd350b0..1f1efce98e 100644 --- a/Jint/Native/Number/NumberPrototype.cs +++ b/Jint/Native/Number/NumberPrototype.cs @@ -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; + } } }