Merge pull request #31832 from nextcloud/firefox-reload-filelist

fix filelist not loading after refresh in firefox
pull/31220/head
Robin Appelman 2022-04-07 18:05:47 +07:00 committed by GitHub
commit 60f946aba5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

@ -791,7 +791,7 @@
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);

@ -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();