Skip to content

Commit

Permalink
fix: mapstate to avoid error
Browse files Browse the repository at this point in the history
Added mapState in ChooseEdgeConnection to avoid
an error for not loading variables correct
  • Loading branch information
BKristenssonAlfsson committed May 9, 2020
1 parent d4a8914 commit 9608cbb
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/views/ChooseEdgeConnection.vue
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,10 @@ import AppFrame from '@/components/AppFrame.vue'
import {
REMOVE_REMOTE_PEER_ID
} from '../store/action-types.js'
import { mapState } from 'vuex'
import {
PEER_CONNECTED
} from '@/store/mutation-types'
export default {
data: () => {
Expand Down Expand Up @@ -117,11 +121,14 @@ export default {
sendEdgeAddress () {
this.$store.state.pnp.edgeRoom = this.edgeAddress
this.$store.dispatch(REMOVE_REMOTE_PEER_ID)
},
redirect () {
console.log('Redirect!!!!!!')
}
},
computed: {
...mapState({
isEdgeConnected: state =>
state.pnp.peerConnectionStatus === PEER_CONNECTED
})
},
components: {
AppFrame
},
Expand Down

0 comments on commit 9608cbb

Please sign in to comment.