Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/store/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
SHARED: 'shared',
}

export default function storeFactory() {

Check warning on line 32 in src/store/main.js

View workflow job for this annotation

GitHub Actions / NPM lint

Missing JSDoc comment
return new Vuex.Store({
modules: {
actions,
Expand Down Expand Up @@ -383,7 +383,7 @@
commit('addBoard', board)
})
},
/**

Check warning on line 386 in src/store/main.js

View workflow job for this annotation

GitHub Actions / NPM lint

Missing JSDoc @param "commit.state" declaration
* Updates a board API side.
*
* @param commit.commit
Expand All @@ -391,9 +391,14 @@
* @param board The board to update.
* @return {Promise<void>}
*/
async updateBoard({ commit }, board) {
async updateBoard({ commit, state }, board) {
const storedBoard = await apiClient.updateBoard(board)
commit('addBoard', storedBoard)

// keep the currently opened board title in sync after edits
if (state.currentBoard?.id === storedBoard.id) {
commit('setCurrentBoard', storedBoard)
}
},
async createBoard({ commit }, boardData) {
try {
Expand Down
Loading