Skip to content

Commit 9608cbb

Browse files
fix: mapstate to avoid error
Added mapState in ChooseEdgeConnection to avoid an error for not loading variables correct
1 parent d4a8914 commit 9608cbb

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

Diff for: src/views/ChooseEdgeConnection.vue

+10-3
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,10 @@ import AppFrame from '@/components/AppFrame.vue'
8888
import {
8989
REMOVE_REMOTE_PEER_ID
9090
} from '../store/action-types.js'
91+
import { mapState } from 'vuex'
92+
import {
93+
PEER_CONNECTED
94+
} from '@/store/mutation-types'
9195
9296
export default {
9397
data: () => {
@@ -117,11 +121,14 @@ export default {
117121
sendEdgeAddress () {
118122
this.$store.state.pnp.edgeRoom = this.edgeAddress
119123
this.$store.dispatch(REMOVE_REMOTE_PEER_ID)
120-
},
121-
redirect () {
122-
console.log('Redirect!!!!!!')
123124
}
124125
},
126+
computed: {
127+
...mapState({
128+
isEdgeConnected: state =>
129+
state.pnp.peerConnectionStatus === PEER_CONNECTED
130+
})
131+
},
125132
components: {
126133
AppFrame
127134
},

0 commit comments

Comments
 (0)