@liveblocks/client
Advanced tools
Comparing version 0.12.0 to 0.12.1
@@ -577,3 +577,3 @@ "use strict"; | ||
const throttleDelay = options.throttle || 100; | ||
const liveblocksServer = options.liveblocksServer || "wss://liveblocks.net/v3"; | ||
const liveblocksServer = options.liveblocksServer || "wss://liveblocks.net/v4"; | ||
let authEndpoint; | ||
@@ -580,0 +580,0 @@ if (options.authEndpoint) { |
@@ -23,8 +23,8 @@ "use strict"; | ||
createDocFromMessage(message) { | ||
if (message.items.length === 0) { | ||
this._doc = doc_1.Doc.from(this.options.defaultRoot, this.options.getConnectionId(), this.options.dispatch); | ||
this._doc = doc_1.Doc.load(message.items, this.options.getConnectionId(), this.options.dispatch); | ||
for (const key in this.options.defaultRoot) { | ||
if (this._doc.root.get(key) == null) { | ||
this._doc.root.set(key, this.options.defaultRoot[key]); | ||
} | ||
} | ||
else { | ||
this._doc = doc_1.Doc.load(message.items, this.options.getConnectionId(), this.options.dispatch); | ||
} | ||
} | ||
@@ -31,0 +31,0 @@ getDocument() { |
@@ -550,3 +550,3 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
const throttleDelay = options.throttle || 100; | ||
const liveblocksServer = options.liveblocksServer || "wss://liveblocks.net/v3"; | ||
const liveblocksServer = options.liveblocksServer || "wss://liveblocks.net/v4"; | ||
let authEndpoint; | ||
@@ -553,0 +553,0 @@ if (options.authEndpoint) { |
@@ -21,8 +21,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
createDocFromMessage(message) { | ||
if (message.items.length === 0) { | ||
this._doc = Doc.from(this.options.defaultRoot, this.options.getConnectionId(), this.options.dispatch); | ||
this._doc = Doc.load(message.items, this.options.getConnectionId(), this.options.dispatch); | ||
for (const key in this.options.defaultRoot) { | ||
if (this._doc.root.get(key) == null) { | ||
this._doc.root.set(key, this.options.defaultRoot[key]); | ||
} | ||
} | ||
else { | ||
this._doc = Doc.load(message.items, this.options.getConnectionId(), this.options.dispatch); | ||
} | ||
} | ||
@@ -29,0 +29,0 @@ getDocument() { |
{ | ||
"name": "@liveblocks/client", | ||
"version": "0.12.0", | ||
"version": "0.12.1", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "./lib/cjs/index.js", |
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
240967