diff options
author | Thomas Müller <DeepDiver1975@users.noreply.github.com> | 2016-04-21 23:21:18 +0200 |
---|---|---|
committer | Thomas Müller <DeepDiver1975@users.noreply.github.com> | 2016-04-21 23:21:18 +0200 |
commit | a1da081c6232dfdcecf4ede231a7cab6b60b99b7 (patch) | |
tree | ae09dd926ad666d4e9be7a8e6c80914b1edb83ed /apps | |
parent | 37f6b9eaf71bdfcae26a224b282908a128ef1803 (diff) | |
parent | df2a9d1733c41c7e4550ac74c28ee0e9461bfa19 (diff) | |
download | nextcloud-server-a1da081c6232dfdcecf4ede231a7cab6b60b99b7.tar.gz nextcloud-server-a1da081c6232dfdcecf4ede231a7cab6b60b99b7.zip |
Merge pull request #24157 from owncloud/files-app-is-not-available-on-public-page
OCA.Files.App is not available on public page
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files/js/filelist.js | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js index ea0f0666b4a..16ca5e91ed2 100644 --- a/apps/files/js/filelist.js +++ b/apps/files/js/filelist.js @@ -147,7 +147,7 @@ /** * @type Backbone.Model */ - _filesConfig: null, + _filesConfig: undefined, /** * Sort attribute @@ -205,12 +205,15 @@ if (options.config) { this._filesConfig = options.config; - } else { + } else if (!_.isUndefined(OCA.Files) && !_.isUndefined(OCA.Files.App)) { this._filesConfig = OCA.Files.App.getFilesConfig(); } - this._filesConfig.on('change:showhidden', function() { - self.setFiles(self.files); - }); + + if (!_.isUndefined(this._filesConfig)) { + this._filesConfig.on('change:showhidden', function() { + self.setFiles(self.files); + }); + } if (options.dragOptions) { this._dragOptions = options.dragOptions; @@ -984,7 +987,7 @@ * @returns {array} */ _filterHiddenFiles: function(files) { - if (this._filesConfig.get('showhidden')) { + if (_.isUndefined(this._filesConfig) || this._filesConfig.get('showhidden')) { return files; } return _.filter(files, function(file) { |