Skip to content

Commit 32d2c57

Browse files
committed
fix: check if ref exists
necessary when using dates because they come back as null
1 parent a011e40 commit 32d2c57

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/utils.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export function extractRefs (doc, oldDoc, path = '', result = [{}, {}]) {
1919
return Object.keys(doc).reduce((tot, key) => {
2020
const ref = doc[key]
2121
// if it's a ref
22-
if (typeof ref.isEqual === 'function') {
22+
if (ref && typeof ref.isEqual === 'function') {
2323
tot[0][key] = oldDoc[key] || ref.path
2424
// TODO handle subpathes?
2525
tot[1][path + key] = ref

0 commit comments

Comments
 (0)