Using await in frontend code
The following discussion from gitlab-ee!8591 should be addressed:
-
@tristan.read started a discussion: (+9 comments) just curious - is the convention to prefer promises over async/await? I think this block would read and debug more cleanly if it was refactored to use async/await:
try { const { data } = await gl.boardService.allBoards(); this.loading = false; this.boards = data; await this.$nextTick(); this.setScrollFade(); } catch (e) { this.loading = false; }
Edit: Closing until https://gitlab.com/gitlab-org/gitlab-ce/issues/49106 is ready. See https://gitlab.com/gitlab-org/gitlab-ce/issues/56511#note_133741327 for more details.
Edited by Tristan Read