Commit 04b8f3d3 authored by Himanshu Kapoor's avatar Himanshu Kapoor Committed by Kushal Pandya

Cleanup async actions

Use return instead of calling done() and done.fail()
parent 4529939f
...@@ -79,11 +79,13 @@ export const getFileData = ( ...@@ -79,11 +79,13 @@ export const getFileData = (
return service return service
.getFileData(url) .getFileData(url)
.then(({ data }) => { .then(({ data }) => {
setPageTitleForFile(state, file);
if (data) commit(types.SET_FILE_DATA, { data, file }); if (data) commit(types.SET_FILE_DATA, { data, file });
if (openFile) commit(types.TOGGLE_FILE_OPEN, path); if (openFile) commit(types.TOGGLE_FILE_OPEN, path);
if (makeFileActive) dispatch('setFileActive', path);
if (makeFileActive) {
setPageTitleForFile(state, file);
dispatch('setFileActive', path);
}
}) })
.catch(() => { .catch(() => {
dispatch('setErrorMessage', { dispatch('setErrorMessage', {
......
---
title: 'Web IDE: Page title should not be .editorconfig when the IDE is first loaded.'
merge_request: 36783
author:
type: fixed
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment