summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@owncloud.com>2016-04-21 14:23:18 +0200
committerChristoph Wurst <christoph@owncloud.com>2016-04-21 14:23:18 +0200
commitdf2a9d1733c41c7e4550ac74c28ee0e9461bfa19 (patch)
treea3afd4d9c50ef076539cd68fd1302076d7b18a6d /apps
parente673ff0f330425ac37697e2ce2f262888289b406 (diff)
downloadnextcloud-server-df2a9d1733c41c7e4550ac74c28ee0e9461bfa19.tar.gz
nextcloud-server-df2a9d1733c41c7e4550ac74c28ee0e9461bfa19.zip
OCA.Files.App is not available on public page
Diffstat (limited to 'apps')
-rw-r--r--apps/files/js/filelist.js15
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) {