Skip to content

Commit

Permalink
Revert previous commit. Check if parent prop is null before uploading…
Browse files Browse the repository at this point in the history
… files.

Use this to conditionalize explicit triggering of inheritance check.
  • Loading branch information
rtibbles committed Sep 27, 2024
1 parent 3eb4bda commit 603fd56
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@
</BottomBar>
<InheritAncestorMetadataModal
ref="inheritModal"
:parent="createMode ? parent : null"
:parent="(createMode && detailNodeIds.length) ? parent : null"
@inherit="inheritMetadata"
@updateActive="active => isInheritModalOpen = active"
/>
Expand Down Expand Up @@ -549,6 +549,7 @@
},
async createNodesFromUploads(fileUploads) {
this.creatingNodes = true;
const parentPropDefinedForInheritModal = Boolean(this.$refs.inheritModal?.parent);
this.newNodeIds = await Promise.all(
fileUploads.map(async (file, index) => {
let title;
Expand All @@ -575,7 +576,11 @@
})
);
this.creatingNodes = false;
this.resetInheritMetadataModal();
if (parentPropDefinedForInheritModal) {
// Only call this if the parent prop was previously defined, otherwise,
// rely on the parent prop watcher to trigger the inherit event.
this.resetInheritMetadataModal();
}
},
updateTitleForPage() {
this.updateTabTitle(this.$store.getters.appendChannelName(this.modalTitle));
Expand Down

0 comments on commit 603fd56

Please sign in to comment.