Calling $on for $eventHub conditional on its presence.
This code on the mount event for this component when using the embedded viewer on a page is very noisy with respect to $eventHub seemingly being not present on the Vue instance, or at least not at the time of mounting.
This commit is contained in:
committed by
GitHub
parent
437e1558ec
commit
7b505e0241
@@ -164,12 +164,14 @@ export default {
|
||||
if (this.props) {
|
||||
this.parseAndSetFilters()
|
||||
}
|
||||
this.$eventHub.$on('structure-filters', () => {
|
||||
this.activeFilter = null
|
||||
})
|
||||
this.$eventHub.$on('selection-filters', () => {
|
||||
this.activeFilter = null
|
||||
})
|
||||
if (this.$eventHub) {
|
||||
this.$eventHub.$on('structure-filters', () => {
|
||||
this.activeFilter = null
|
||||
})
|
||||
this.$eventHub.$on('selection-filters', () => {
|
||||
this.activeFilter = null
|
||||
})
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
parseAndSetFilters() {
|
||||
|
||||
Reference in New Issue
Block a user