Skip to content

Commit 59a75e5

Browse files
committed
fix identifying data changes. fix TestConnection.
1 parent a6c7173 commit 59a75e5

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

Assets/Plugins/Colyseus/DeltaListener/Compare.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ protected static void Generate(IndexedDictionary<string, object> mirror, Indexed
6060

6161
if (
6262
(oldVal as IEnumerable) != null &&
63-
(oldVal as IEnumerable) != null &&
63+
(newVal as IEnumerable) != null &&
6464
Object.ReferenceEquals(oldVal.GetType(), newVal.GetType())
6565
)
6666
{

Assets/Tests/RoomTest.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ public IEnumerator TestConnection()
2828
Assert.NotNull (component.room.sessionId);
2929
};
3030

31-
Assert.NotNull (component.room.data ["players"]);
32-
Assert.NotNull (component.room.data ["messages"]);
31+
component.room.OnUpdate += (object sender, RoomUpdateEventArgs e) => {
32+
Assert.NotNull (component.room.data ["players"]);
33+
Assert.NotNull (component.room.data ["messages"]);
34+
};
3335
}
3436
}

0 commit comments

Comments
 (0)