Created
July 12, 2018 14:07
-
-
Save numfin/72cac57b88f859d1640ada459ebea83b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
switchToChannel({state, commit, dispatch}, channelID) { | |
const exists = this.selectByKey(state.channels, {key: '_id', value: channelID}) | |
if (exists) { | |
Object.keys(channels).forEach(key => { | |
const id = channels[key]._id | |
if (id === channelID) { | |
commit('channel', channels[i]) | |
} | |
}) | |
} else { | |
if(!process.env.production) { | |
console.log('NOT YOUR CHANNEL') | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment