Skip to content

Commit

Permalink
[bugfix] Allow datasets without mutations
Browse files Browse the repository at this point in the history
See #1474 for more context
  • Loading branch information
jameshadfield committed Feb 23, 2022
1 parent 5f36a94 commit fb05e73
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/util/treeMiscHelpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,7 @@ export const categoriseSeqChanges = (seqChangesToRoot) => {
*/
export const getBranchMutations = (branchNode, observedMutations) => {
const mutations = branchNode.branch_attrs && branchNode.branch_attrs.mutations;
if (typeof mutations !== "object") return {};
const seqChangesToRoot = branchNode.parent===branchNode ? {} : getSeqChanges(branchNode, mutations);
const categorisedMutations = categoriseMutations(mutations, observedMutations, seqChangesToRoot);
return categorisedMutations;
Expand Down

0 comments on commit fb05e73

Please sign in to comment.