gritzko/swarm

Model do not throw error on wrong ID

Closed this issue · 1 comments

ai commented

I wrote wrong code:

var id = 32;
new MyModel(id);

where I used number ID instead of string. As result Swarm didn’t sync models.

But I think it is common mistake and we should throw a error on wrong type of ID.

To avoid confusion, 1.0 dispenses known-id objects from Host.get.
new Type() makes new objects.