@roomservice/browser
Advanced tools
Comparing version 0.4.1 to 0.4.2
@@ -10,2 +10,3 @@ import { Obj, Room, Session } from "./types"; | ||
private _actorId?; | ||
private _defaultDoc?; | ||
_socketURL: string; | ||
@@ -12,0 +13,0 @@ private _onUpdateSocketCallback?; |
@@ -42,2 +42,3 @@ "use strict"; | ||
this._authorizationUrl = parameters.authUrl; | ||
this._defaultDoc = parameters.defaultDoc; | ||
this._peer = new manymerge_1.Peer(this._sendMsgToSocket); | ||
@@ -81,3 +82,3 @@ this._socketURL = constants_1.ROOM_SERICE_SOCKET_URL; | ||
if (!this._doc) { | ||
await this.readActorIdThenCreateDoc(); | ||
await this.readActorIdThenCreateDoc(this._defaultDoc); | ||
} | ||
@@ -97,3 +98,3 @@ return this.syncOfflineCache(); | ||
if (!this._doc) { | ||
await this.readActorIdThenCreateDoc(); | ||
await this.readActorIdThenCreateDoc(this._defaultDoc); | ||
} | ||
@@ -205,3 +206,3 @@ // we're offline, so we should just continue with our fun little world | ||
if (!this._doc) { | ||
await this.readActorIdThenCreateDoc(); | ||
await this.readActorIdThenCreateDoc(this._defaultDoc); | ||
} | ||
@@ -276,3 +277,3 @@ // convert the payload clock to a map | ||
if (!this._doc) { | ||
this._doc = await this.readActorIdThenCreateDoc(); | ||
this._doc = await this.readActorIdThenCreateDoc(this._defaultDoc); | ||
} | ||
@@ -286,3 +287,3 @@ if (typeof callback !== "function") { | ||
// this happens if someone deletes the doc, so we should just reinit it. | ||
newDoc = this.createDoc(this._actorId); | ||
newDoc = this.createDoc(this._actorId, this._defaultDoc); | ||
} | ||
@@ -289,0 +290,0 @@ this._doc = newDoc; |
{ | ||
"name": "@roomservice/browser", | ||
"version": "0.4.1", | ||
"version": "0.4.2", | ||
"main": "dist/index", | ||
@@ -5,0 +5,0 @@ "types": "dist/index", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
64646
1001