From bbff530b65f38bc7eac071e5142d9f07bd3d9f94 Mon Sep 17 00:00:00 2001 From: Hasso Tepper Date: Tue, 18 Aug 2015 10:31:02 +0300 Subject: [PATCH] Move decaration to the beginning of the block --- apps/files/js/filelist.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js index 6fb5fcc35b7..e7becb01207 100644 --- a/apps/files/js/filelist.js +++ b/apps/files/js/filelist.js @@ -1930,6 +1930,8 @@ updateSelectionSummary: function() { var summary = this._selectionSummary.summary; var canDelete; + var selection; + if (summary.totalFiles === 0 && summary.totalDirs === 0) { this.$el.find('#headerName a.name>span:first').text(t('files','Name')); this.$el.find('#headerSize a>span:first').text(t('files','Size')); @@ -1950,11 +1952,11 @@ dirs: directoryInfo, files: fileInfo }; - var selection = t('files', '{dirs} and {files}', selectionVars); + selection = t('files', '{dirs} and {files}', selectionVars); } else if (summary.totalDirs > 0) { - var selection = directoryInfo; + selection = directoryInfo; } else { - var selection = fileInfo; + selection = fileInfo; } this.$el.find('#headerName a.name>span:first').text(selection);