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
1 changed files with 1 additions and 1 deletions

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 = {