colyseus/colyseus-haxe

Runtime error once room state updated

serjek opened this issue · 0 comments

Following runtime exception occurs once room state updated:

{ [Error: Cannot cast ArraySchema(1) { { id => 1, rating => 0 } }  to {
	__name__ : io.colyseus.serializer.schema.ArraySchema_Dynamic
}]

It does not make sense to cast to specific type because once cast fails it throws. In order to avoid that would be safer to cast normally, since it is Dynamic schema anyway. I made a PR to counter that.