From 93f9db4d59ec7795fe998d45ae8b49f3581231c0 Mon Sep 17 00:00:00 2001 From: noveens Date: Wed, 1 Mar 2017 17:27:48 +0530 Subject: filelist only refreshed if directory changes check introduced at another method comment added to explain one check comment added to explain one check unit tests added small fixes in unit tests missing semicolon added Signed-off-by: Morris Jobke --- apps/files/js/filelist.js | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'apps/files/js/filelist.js') diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js index 3a59da53517..1f4b8f0ec68 100644 --- a/apps/files/js/filelist.js +++ b/apps/files/js/filelist.js @@ -557,6 +557,11 @@ */ _onUrlChanged: function(e) { if (e && _.isString(e.dir)) { + var currentDir = this.getCurrentDirectory(); + // this._currentDirectory is NULL when fileList is first initialised + if( (this._currentDirectory || this.$el.find('#dir').val()) && currentDir === e.dir) { + return; + } this.changeDirectory(e.dir, false, true); } }, -- cgit v1.2.3