Skip to content

Commit b04f723

Browse files
committed
only set lastUdpated if value is present
1 parent f58f941 commit b04f723

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/store/api.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ function fetch (child) {
5151
api.child(child).once('value', snapshot => {
5252
const val = snapshot.val()
5353
// mark the timestamp when this item is cached
54-
val.__lastUpdated = Date.now()
54+
if (val) val.__lastUpdated = Date.now()
5555
cache && cache.set(child, val)
5656
resolve(val)
5757
}, reject)

0 commit comments

Comments
 (0)