Skip to content

Commit

Permalink
commit this.comparebuildings log
Browse files Browse the repository at this point in the history
  • Loading branch information
solderq35 committed Dec 18, 2023
1 parent e837df0 commit 3724f5d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/components/view/view.vue
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ export default {
compareBuildings: {
get () {
if ( !this.$route.path.includes( 'compare' ) ) return null
console.log( this.$route.params.buildings )
return JSON.parse( decodeURI( this.$route.params.buildings ) ).map( id => this.$store.getters['map/building']( id ) )
}
},
Expand All @@ -192,7 +193,9 @@ export default {
if ( !this.compareBuildings || this.compareBuildings.length === 0 || !this.compareBuildings[0] ) {
return []
}
console.log( this.compareBuildings )
let building = this.$store.getters['map/building']( this.compareBuildings[0].id )
console.log( building )
if ( !building ) return []
let group = this.$store.getters[building.path + '/primaryGroup']( 'Electricity' )
let block = this.$store.getters[building.path + '/block']( group.id )
Expand Down

0 comments on commit 3724f5d

Please sign in to comment.