bulbul-chat
Advanced tools
Comparing version 1.5.0 to 1.5.1
"use strict"; | ||
var __assign = (this && this.__assign) || function () { | ||
__assign = Object.assign || function(t) { | ||
for (var s, i = 1, n = arguments.length; i < n; i++) { | ||
s = arguments[i]; | ||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) | ||
t[p] = s[p]; | ||
} | ||
return t; | ||
}; | ||
return __assign.apply(this, arguments); | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
@@ -9,3 +20,3 @@ var InMemoryCollection = /** @class */ (function () { | ||
InMemoryCollection.prototype.upsert = function (item) { | ||
this.items[item[this.uniqueKey]] = item; | ||
this.items[item[this.uniqueKey]] = __assign(__assign({}, this.items[item[this.uniqueKey]]), item); | ||
return item; | ||
@@ -12,0 +23,0 @@ }; |
{ | ||
"name": "bulbul-chat", | ||
"version": "1.5.0", | ||
"version": "1.5.1", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -10,3 +10,3 @@ type ItemConstraint = Record<string, any>; | ||
public upsert(item: Item) { | ||
this.items[item[this.uniqueKey]] = item; | ||
this.items[item[this.uniqueKey]] = {...this.items[item[this.uniqueKey]],...item}; | ||
return item; | ||
@@ -13,0 +13,0 @@ } |
100396
2365