Skip to content

Commit

Permalink
a Promise implementation shouldn't be necessary to use colyseus.js
Browse files Browse the repository at this point in the history
  • Loading branch information
endel committed Mar 9, 2018
1 parent ba09be1 commit 6bec091
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
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.8.2",
"version": "0.8.3",
"description": "Multiplayer Game Client for the Browser",
"keywords": [
"multiplayer",
Expand Down
5 changes: 4 additions & 1 deletion src/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@ export class Client {
this.hostname = url;
let colyseusid: any = this.storage.getItem('colyseusid');

if (!(colyseusid instanceof Promise)) {
if (
typeof(Promise) === "undefined" || // old browsers
!(colyseusid instanceof Promise)
) {
// browser has synchronous return
this.createConnection(colyseusid);

Expand Down

0 comments on commit 6bec091

Please sign in to comment.