From b24316b2fe757324b037aea7e06ce52d8dfa53d8 Mon Sep 17 00:00:00 2001 From: Phil Hughes Date: Tue, 20 Nov 2018 15:11:33 +0000 Subject: Added a test for open merge request files --- app/assets/javascripts/ide/stores/actions/file.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/assets/javascripts/ide/stores') diff --git a/app/assets/javascripts/ide/stores/actions/file.js b/app/assets/javascripts/ide/stores/actions/file.js index 2cdbb312b9e..a297740bd5f 100644 --- a/app/assets/javascripts/ide/stores/actions/file.js +++ b/app/assets/javascripts/ide/stores/actions/file.js @@ -74,7 +74,7 @@ export const getFileData = ( const normalizedHeaders = normalizeHeaders(headers); setPageTitle(decodeURI(normalizedHeaders['PAGE-TITLE'])); - 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 (makeFileActive) dispatch('setFileActive', path); commit(types.TOGGLE_LOADING, { entry: file }); -- cgit v1.2.1