From 083ca7270df2012c0f3414e819d5e74ceb59eb90 Mon Sep 17 00:00:00 2001 From: Assunta DeSanto Date: Tue, 23 Aug 2022 15:01:03 -0400 Subject: [PATCH] adding conditional to only emit update if the history ID changes --- .../History/CurrentCollection/CollectionPanel.vue | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/client/src/components/History/CurrentCollection/CollectionPanel.vue b/client/src/components/History/CurrentCollection/CollectionPanel.vue index 77ea4c07fa4..7877ae38286 100644 --- a/client/src/components/History/CurrentCollection/CollectionPanel.vue +++ b/client/src/components/History/CurrentCollection/CollectionPanel.vue @@ -84,9 +84,11 @@ export default { }, }, watch: { - history() { - // Send up event closing out selected collection on history change. - this.$emit("update:selected-collections", []); + history(newHistory, oldHistory) { + if (newHistory.id != oldHistory.id) { + // Send up event closing out selected collection on history change. + this.$emit("update:selected-collections", []); + } }, }, methods: {