diff options
author | Lukas Reschke <lukas@statuscode.ch> | 2014-05-30 17:20:09 +0200 |
---|---|---|
committer | Lukas Reschke <lukas@statuscode.ch> | 2014-05-30 17:20:09 +0200 |
commit | b7f163a701e7c42fafac13477313636ba771e31a (patch) | |
tree | 069688d5126ba99bc682235b90fec27a95a43dd0 /apps | |
parent | c8a19adc3ad54516855b266e8a3fa5ff679adad7 (diff) | |
parent | caf283615d292cf60b0670e22512101a4c43cd6d (diff) | |
download | nextcloud-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.js | 5 |
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() { |