Skip to content

Commit ea04c19

Browse files
author
Fraser Greenroyd
committed
Update following discussion with @adecler
1 parent 7f2c010 commit ea04c19

File tree

1 file changed

+1
-16
lines changed
  • Serialiser_Engine/Compute/Deserialise

1 file changed

+1
-16
lines changed

Serialiser_Engine/Compute/Deserialise/List.cs

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -80,22 +80,7 @@ private static List<List<T>> DeserialiseNestedList<T>(this BsonValue bson, List<
8080

8181
private static bool IsNestedList(this BsonValue bson)
8282
{
83-
int nest = 0;
84-
85-
while(bson.IsBsonArray)
86-
{
87-
nest++;
88-
try
89-
{
90-
bson = bson[0];
91-
}
92-
catch
93-
{
94-
break;
95-
}
96-
}
97-
98-
return nest > 1;
83+
return bson.IsBsonArray && bson.AsBsonArray.Count > 0 && bson.AsBsonArray[0].IsBsonArray;
9984
}
10085
}
10186
}

0 commit comments

Comments
 (0)