diff --git a/src/components/image-editor.vue b/src/components/image-editor.vue index d4ba3d92..3cc7f00e 100644 --- a/src/components/image-editor.vue +++ b/src/components/image-editor.vue @@ -154,7 +154,6 @@ export default class ImageEditorV extends Vue { // Check if the config file exists in the ZIP folder first. const assetSrc = `${image.src.substring(image.src.indexOf('/') + 1)}`; const filename = image.src.replace(/^.*[\\/]/, ''); - const assetFile = this.configFileStructure.zip.file(assetSrc); if (assetFile) { this.imagePreviewPromises.push( diff --git a/src/components/slide-editor.vue b/src/components/slide-editor.vue index a7274f60..89e5528c 100644 --- a/src/components/slide-editor.vue +++ b/src/components/slide-editor.vue @@ -504,15 +504,17 @@ export default class SlideEditorV extends Vue { } }; - // Before swapping panel type, update sources from the to-be-deleted config. - this.currentSlide.panel.forEach((panel: BasePanel) => this.removeSourceCounts(panel)); - // When switching to a dynamic panel, remove the secondary panel. if (newType === 'dynamic') { + // Remove source content of both panels + this.currentSlide.panel.forEach((panel: BasePanel) => this.removeSourceCounts(panel)); this.panelIndex = 0; this.currentSlide['panel'] = [startingConfig[newType as keyof DefaultConfigs]]; this.dynamicSelected = true; } else { + // Remove source content of panel having its type swapped + this.removeSourceCounts(this.currentSlide.panel[this.panelIndex]); + // Switching panel type when dynamic panels are not involved. this.currentSlide.panel[this.panelIndex] = startingConfig[newType as keyof DefaultConfigs]; } diff --git a/src/components/video-editor.vue b/src/components/video-editor.vue index 4066f0d6..ae4264ea 100644 --- a/src/components/video-editor.vue +++ b/src/components/video-editor.vue @@ -280,10 +280,7 @@ export default class VideoEditorV extends Vue { onVideoEdited(): void { this.edited = true; - this.$emit( - 'slide-edit', - (this.videoPreview?.videoType || this.videoPreview?.title?.length) ? true : false - ); + this.$emit('slide-edit', this.videoPreview?.videoType || this.videoPreview?.title?.length ? true : false); } }