From 603fd56af5ef1744c3c3e780914cdf3aec23425e Mon Sep 17 00:00:00 2001 From: Richard Tibbles Date: Fri, 27 Sep 2024 14:56:59 -0700 Subject: [PATCH] Revert previous commit. Check if parent prop is null before uploading files. Use this to conditionalize explicit triggering of inheritance check. --- .../frontend/channelEdit/components/edit/EditModal.vue | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/contentcuration/contentcuration/frontend/channelEdit/components/edit/EditModal.vue b/contentcuration/contentcuration/frontend/channelEdit/components/edit/EditModal.vue index 68a4abb27a..3ab92e6cbb 100644 --- a/contentcuration/contentcuration/frontend/channelEdit/components/edit/EditModal.vue +++ b/contentcuration/contentcuration/frontend/channelEdit/components/edit/EditModal.vue @@ -129,7 +129,7 @@ @@ -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; @@ -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));