Skip to content

Commit

Permalink
Prevent DataStore property being stored
Browse files Browse the repository at this point in the history
  • Loading branch information
QSmally committed Nov 3, 2020
1 parent 6e8e37c commit 7c489f9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Connections/Connection.js
Original file line number Diff line number Diff line change
Expand Up @@ -322,9 +322,9 @@ class Connection extends PartialConnection {
if (Value === undefined) return null;
const [Key, Path] = this._Resolve(KeyOrPath);

if (Value && typeof Value === "object") delete Value._DataStore;
if (typeof Path !== "undefined") Value = this._CastPath(this.Fetch(Key) || {}, Path, Value);
else if (typeof Value !== "object") return null;
if (Value) delete Value._DataStore;

if (this.Cache.has(Key)) this._Patch(Key, Value);
this.API.prepare(`INSERT OR REPLACE INTO '${this.Table}' ('Key', 'Val') VALUES (?, ?);`)
Expand Down

0 comments on commit 7c489f9

Please sign in to comment.