OK, so I am not sure how best to describe the problem. In the code below. There is a method called leaveRoom(room). This code when invoked tells a system to vacate a room, then join array object 0 as the current room by using the mentioned method. However it isnt doing the line this.setRoom(this.joinedRooms[0]);
I can tell you there is an object 0 in the joinedRooms.
Any idea what the syntax error is?
methods: {
connect () {
        setRoom(room) {
            this.$store.dispatch(RoomTypes.CURRENT_ROOM, room);
            this.currentRoom = room;
            this.$emit('onSelectRoom', room);
        },
        leaveRoom(room) {
            this.room = this.currentRoom; 
            this.$store.dispatch(RoomTypes.LEAVE_ROOM, room.id);
            Echo.leave("chat." + this.currentRoom.id);
            this.setRoom(this.joinedRooms[0]);
        }
    },
    created() {
        this.$store.dispatch(RoomTypes.GET_ROOMS);
    },
    computed: {
        ...mapGetters({ theme: "getTheme" }),
        joinedRooms() {
            return this.$store.state.rooms.joinedRooms;
        },
