Skip to content

Commit

Permalink
refactor(utils): remove useless fallback
Browse files Browse the repository at this point in the history
  • Loading branch information
posva committed Dec 29, 2017
1 parent e9f62f2 commit eda2e9c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ export function extractRefs (doc, oldDoc, path = '', result = [{}, {}]) {
} else if (Array.isArray(ref)) {
// TODO handle array
tot[0][key] = Array(ref.length).fill(null)
extractRefs(ref, oldDoc[key] || {}, path + key + '.', [tot[0][key], tot[1]])
extractRefs(ref, oldDoc[key], path + key + '.', [tot[0][key], tot[1]])
} else if (isObject(ref)) {
tot[0][key] = {}
extractRefs(ref, oldDoc[key] || {}, path + key + '.', [tot[0][key], tot[1]])
extractRefs(ref, oldDoc[key], path + key + '.', [tot[0][key], tot[1]])
} else {
tot[0][key] = ref
}
Expand Down

0 comments on commit eda2e9c

Please sign in to comment.