summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorLukas Reschke <lukas@statuscode.ch>2014-05-30 17:20:09 +0200
committerLukas Reschke <lukas@statuscode.ch>2014-05-30 17:20:09 +0200
commitb7f163a701e7c42fafac13477313636ba771e31a (patch)
tree069688d5126ba99bc682235b90fec27a95a43dd0 /apps
parentc8a19adc3ad54516855b266e8a3fa5ff679adad7 (diff)
parentcaf283615d292cf60b0670e22512101a4c43cd6d (diff)
downloadnextcloud-server-b7f163a701e7c42fafac13477313636ba771e31a.tar.gz
nextcloud-server-b7f163a701e7c42fafac13477313636ba771e31a.zip
Merge pull request #8695 from owncloud/jserrorfixes
Fixed undefined object error that appears after a delay
Diffstat (limited to 'apps')
-rw-r--r--apps/files/js/files.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/apps/files/js/files.js b/apps/files/js/files.js
index fb112f157f1..4549de57f3f 100644
--- a/apps/files/js/files.js
+++ b/apps/files/js/files.js
@@ -258,8 +258,9 @@
// only possible at the moment if user is logged in or the files app is loaded
if (OC.currentUser && OCA.Files.App) {
// start on load - we ask the server every 5 minutes
+ var func = _.bind(OCA.Files.App.fileList.updateStorageStatistics, OCA.Files.App.fileList);
var updateStorageStatisticsInterval = 5*60*1000;
- var updateStorageStatisticsIntervalId = setInterval(OCA.Files.App.fileList.updateStorageStatistics, updateStorageStatisticsInterval);
+ var updateStorageStatisticsIntervalId = setInterval(func, updateStorageStatisticsInterval);
// TODO: this should also stop when switching to another view
// Use jquery-visibility to de-/re-activate file stats sync
@@ -267,7 +268,7 @@
$(document).on({
'show.visibility': function() {
if (!updateStorageStatisticsIntervalId) {
- updateStorageStatisticsIntervalId = setInterval(OCA.Files.App.fileList.updateStorageStatistics, updateStorageStatisticsInterval);
+ updateStorageStatisticsIntervalId = setInterval(func, updateStorageStatisticsInterval);
}
},
'hide.visibility': function() {