1
0
Fork 0
mirror of https://github.com/seejohnrun/haste-server.git synced 2024-11-01 03:21:21 +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 // Save file in a key
set(key, data, callback, skipExpire) { set(key, data, callback, skipExpire) {
var now = new Date(); 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 taskKey = this.datastore.key([this.kind, key])
var task = { var task = {