@instantdb/core
Advanced tools
Comparing version 0.7.0 to 0.7.1
@@ -667,3 +667,10 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
yield this.setCurrentUser(newUser); | ||
this.querySubs.set((_) => ({})); | ||
// We need to remove all `result` from querySubs, | ||
// as they are no longer valid for the new user | ||
this.querySubs.set((prev) => { | ||
Object.keys(prev).forEach((k) => { | ||
delete prev[k].result; | ||
}); | ||
return prev; | ||
}); | ||
this._reconnectTimeoutMs = 0; | ||
@@ -670,0 +677,0 @@ this._ws.close(); |
@@ -695,3 +695,10 @@ "use strict"; | ||
yield this.setCurrentUser(newUser); | ||
this.querySubs.set((_) => ({})); | ||
// We need to remove all `result` from querySubs, | ||
// as they are no longer valid for the new user | ||
this.querySubs.set((prev) => { | ||
Object.keys(prev).forEach((k) => { | ||
delete prev[k].result; | ||
}); | ||
return prev; | ||
}); | ||
this._reconnectTimeoutMs = 0; | ||
@@ -698,0 +705,0 @@ this._ws.close(); |
{ | ||
"name": "@instantdb/core", | ||
"version": "0.7.0", | ||
"version": "0.7.1", | ||
"description": "Instant's core local abstraction", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -772,3 +772,10 @@ import log from "./utils/log"; | ||
await this.setCurrentUser(newUser); | ||
this.querySubs.set((_) => ({})); | ||
// We need to remove all `result` from querySubs, | ||
// as they are no longer valid for the new user | ||
this.querySubs.set((prev) => { | ||
Object.keys(prev).forEach((k) => { | ||
delete prev[k].result; | ||
}); | ||
return prev; | ||
}); | ||
this._reconnectTimeoutMs = 0; | ||
@@ -775,0 +782,0 @@ this._ws.close(); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
1396155
32040
2