Skip to content

Commit

Permalink
fix(merge): Cannot set property 'oid' of undefined (#1312)
Browse files Browse the repository at this point in the history
  • Loading branch information
billiegoose committed Feb 12, 2021
1 parent b102e1d commit 89c0da7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/utils/mergeTree.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,9 @@ export async function mergeTree({
reduce: async (parent, children) => {
const entries = children.filter(Boolean) // remove undefineds

// if the parent was deleted, the children have to go
if (!parent) return

// automatically delete directories if they have been emptied
if (parent && parent.type === 'tree' && entries.length === 0) return

Expand Down

0 comments on commit 89c0da7

Please sign in to comment.