Skip to content

Commit

Permalink
bump 0.10.8. fixes colyseus/colyseus#244
Browse files Browse the repository at this point in the history
  • Loading branch information
endel committed May 26, 2019
1 parent 2c372b8 commit 8d37826
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dist/colyseus.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "colyseus.js",
"version": "0.10.7",
"version": "0.10.8",
"description": "Multiplayer Game Client for the Browser",
"keywords": [
"colyseus",
Expand Down
6 changes: 5 additions & 1 deletion src/Room.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ export class Room<State= any> {

protected previousCode: Protocol;

// TODO: remove me on 1.0.0
protected rootSchema: RootSchemaConstructor;

constructor(name: string, options?: any, rootSchema?: RootSchemaConstructor) {
this.id = null;

Expand All @@ -47,6 +50,7 @@ export class Room<State= any> {

if (rootSchema) {
this.serializer = new (getSerializer("schema"));
this.rootSchema = rootSchema;
(this.serializer as SchemaSerializer).state = new (rootSchema)();

} else {
Expand Down Expand Up @@ -146,7 +150,7 @@ export class Room<State= any> {
}

// TODO: remove this check
if (this.serializerId !== "fossil-delta" && !this.serializer) {
if (this.serializerId !== "fossil-delta" && !this.rootSchema) {
this.serializer = new serializer();
}

Expand Down

0 comments on commit 8d37826

Please sign in to comment.