Skip to content

Commit

Permalink
Replace spread operator for compatibility.
Browse files Browse the repository at this point in the history
  • Loading branch information
vaneenige committed Mar 23, 2018
1 parent b3ff630 commit ea108ee
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class Unvault extends Map {
* @param {object} options
*/
async insert(key, interval, update, options) {
this.set(key, { interval, update, ...options });
this.set(key, Object.assign({ interval, update }, options));
return this.trigger(key, interval !== 0);
}

Expand All @@ -31,7 +31,7 @@ class Unvault extends Map {
const value = await tracker.update(key);
if (this.has(key) === false) return null;

this.set(key, { ...tracker, value });
this.set(key, Object.assign(tracker, { value }));
if (automated) {
setTimeout(() => {
this.trigger(key, automated);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "unvault",
"version": "0.4.0",
"version": "0.5.0",
"description": "A minimal layer for node that allows results of time-consuming tasks to be stored.",
"repository": "vaneenige/unvault",
"main": "lib/index.js",
Expand Down

0 comments on commit ea108ee

Please sign in to comment.