From 98b17bc6deaae530134e8055e25fb303467fbaef Mon Sep 17 00:00:00 2001 From: Fatih Acet Date: Fri, 22 Sep 2017 18:00:32 +0300 Subject: [PATCH] RepoEditor: Fix reopening the existing file on refresh. --- app/assets/javascripts/repo/helpers/repo_helper.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/javascripts/repo/helpers/repo_helper.js b/app/assets/javascripts/repo/helpers/repo_helper.js index 2bd8d7eea65..655e4e7605b 100644 --- a/app/assets/javascripts/repo/helpers/repo_helper.js +++ b/app/assets/javascripts/repo/helpers/repo_helper.js @@ -178,8 +178,8 @@ const RepoHelper = { setFile(data, file) { const newFile = data; + newFile.url = file.url || Service.url; // Grab the URL from service, happens on page refresh. - newFile.url = file.url; if (newFile.render_error === 'too_large' || newFile.render_error === 'collapsed') { newFile.tooLarge = true; }