Explorar o código

[MERGE #5166 @pleath] [MSFT 17513966] Handle case where a non-path type changes to a path type during enumeration

Merge pull request #5166 from pleath:17513966

It's now normal for, e.g., null or simple type to evolve to a path type.
Paul Leathers %!s(int64=7) %!d(string=hai) anos
pai
achega
83238deebd
Modificáronse 1 ficheiros con 1 adicións e 2 borrados
  1. 1 2
      lib/Runtime/Types/PathTypeHandler.cpp

+ 1 - 2
lib/Runtime/Types/PathTypeHandler.cpp

@@ -336,8 +336,7 @@ namespace Js
 
         if (!typeHandlerToEnumerate->IsPathTypeHandler())
         {
-            AssertMsg(false, "Can only enumerate PathTypeHandler if types don't match.");
-            Js::Throw::InternalError();
+            return typeHandlerToEnumerate->FindNextProperty(scriptContext, index, propertyStringName, propertyId, attributes, type, typeToEnumerate, flags, instance, info);
         }
 
         PathTypeHandlerBase* pathTypeToEnumerate = (PathTypeHandlerBase*)typeHandlerToEnumerate;