1
0
Fork 0
mirror of https://github.com/seejohnrun/haste-server.git synced 2024-12-25 11:37:00 +00:00

added condition for this.expire not defined

This commit is contained in:
Yuan 2018-08-28 01:28:26 +01:00
parent 1eeef4ede4
commit 5fb43eb67c

View file

@ -15,7 +15,7 @@ class GoogleDatastoreDocumentStore {
// Save file in a key
set(key, data, callback, skipExpire) {
var now = new Date();
var expireTime = skipExpire ? null : new Date(now.getTime() + this.expire * 1000);
var expireTime = (skipExpire || this.expire === undefined) ? null : new Date(now.getTime() + this.expire * 1000);
var taskKey = this.datastore.key([this.kind, key])
var task = {