Skip to content

Commit 01381aa

Browse files
committed
Used in operator
1 parent 76d0fb9 commit 01381aa

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

app/download.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ const { log } = require('./utilities.js')
1212
const { get: httpsGet } = require('https')
1313
const { join } = require('path')
1414
const authToken = { Authorization: `token ${token}` }
15-
const hasOwn = Object.prototype.hasOwnProperty
1615

1716
const degit = require('tiged')
1817

@@ -37,7 +36,7 @@ function getWithCache (cache, key, fetcher) {
3736
const cached = cache.get(key)
3837

3938
if (cached) {
40-
if (cached.expires && cached.expires > now && hasOwn.call(cached, 'value')) {
39+
if (cached.expires && cached.expires > now && ('value' in cached)) {
4140
return Promise.resolve(cached.value)
4241
}
4342
if (cached.promise) {

0 commit comments

Comments
 (0)