]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix filelist not loading after refresh in firefox 31832/head
authorRobin Appelman <robin@icewind.nl>
Mon, 4 Apr 2022 15:29:52 +0000 (17:29 +0200)
committerRobin Appelman <robin@icewind.nl>
Thu, 7 Apr 2022 15:37:19 +0000 (17:37 +0200)
Signed-off-by: Robin Appelman <robin@icewind.nl>
apps/files/js/filelist.js
apps/files/tests/js/filelistSpec.js

index 4d65723bb3e4e7ab1ea5b02d148f736922517da1..69322273a118e65a6ff34cb93775a7905c27fc0c 100644 (file)
                        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) {
+                               if(this._currentDirectory && currentDir === e.dir) {
                                        return;
                                }
                                this.changeDirectory(e.dir, true, true, undefined, true);
index 8f2ef97b7822905bf6f186dd716937a15fdc16ab..d35b3a19b9c96ece70c3cf82528b67737874c547 100644 (file)
@@ -3442,6 +3442,7 @@ describe('OCA.Files.FileList tests', function() {
 
                beforeEach(function() {
                        fileListStub = sinon.stub(OCA.Files.FileList.prototype, 'changeDirectory');
+                       fileList._currentDirectory = '/subdir';
                });
                afterEach(function() {
                        fileListStub.restore();