Skip to content

Commit 23f475e

Browse files
committed
Use default case for toLocaleString on Arrays
1 parent d568804 commit 23f475e

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

lib/Runtime/Language/JavascriptConversion.cpp

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -701,17 +701,6 @@ using namespace Js;
701701
case TypeIds_Number:
702702
return JavascriptNumber::ToLocaleString(JavascriptNumber::GetValue(aValue), scriptContext);
703703

704-
case TypeIds_String: {
705-
RecyclableObject* object = VarTo<RecyclableObject>(aValue);
706-
Var value = JavascriptOperators::GetProperty(object, PropertyIds::toLocaleString, scriptContext, NULL);
707-
RecyclableObject* toLocaleStringFunction = VarTo<RecyclableObject>(value);
708-
Var aResult = scriptContext->GetThreadContext()->ExecuteImplicitCall(toLocaleStringFunction, Js::ImplicitCall_ToPrimitive, [=]()->Js::Var
709-
{
710-
return CALL_FUNCTION(scriptContext->GetThreadContext(), toLocaleStringFunction, CallInfo(1), aValue);
711-
});
712-
return UnsafeVarTo<JavascriptString>(aResult);
713-
}
714-
715704
case TypeIds_VariantDate:
716705
// Legacy behavior was to create an empty object and call toLocaleString on it, which would result in this value
717706
return scriptContext->GetLibrary()->GetObjectDisplayString();

0 commit comments

Comments
 (0)