Skip to content

Commit 97d2db4

Browse files
author
Bobby
authored
Merge pull request #27 from TARAAI/u/bs/fix-timestamp
fix: timestamp
2 parents 6a239bb + 9e337ca commit 97d2db4

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/reducers/cacheReducer.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ import {
2020
isEmpty,
2121
identity,
2222
} from 'lodash';
23-
import { Timestamp } from 'firebase/firestore';
2423
import { actionTypes } from '../constants';
2524
import { getBaseQueryName } from '../utils/query';
2625
import mark from '../utils/profiling';
26+
import { getFirestore } from '../createFirestoreInstance';
2727

2828
const info = debug('rrf:cache');
2929
const verbose = debug('rrfVerbose:cache');
@@ -508,7 +508,8 @@ const arrayRemove = (key, val, cached) =>
508508
const increment = (key, val, cached) =>
509509
key === '::increment' && typeof val === 'number' && (cached() || 0) + val;
510510

511-
const serverTimestamp = (key) => key === '::serverTimestamp' && Timestamp.now();
511+
const serverTimestamp = (key) =>
512+
key === '::serverTimestamp' && getFirestore().Timestamp.now();
512513

513514
/**
514515
* Process Mutation to a vanilla JSON

0 commit comments

Comments
 (0)