diff options
author | Vincent Petry <pvince81@owncloud.com> | 2014-05-23 16:13:35 +0200 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2014-05-23 16:13:35 +0200 |
commit | caf283615d292cf60b0670e22512101a4c43cd6d (patch) | |
tree | 6ea00ea2bb57973ed9b01e6eac64eeab67c06d7d /apps | |
parent | 71e1d919de274e30aa043dc6cae67d4e993b2f26 (diff) | |
download | nextcloud-server-caf283615d292cf60b0670e22512101a4c43cd6d.tar.gz nextcloud-server-caf283615d292cf60b0670e22512101a4c43cd6d.zip |
Fixed undefined object error that appears after a delay
Now binding properly with the file list instance object.
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 92f97f5d3c0..d3f4a944bf5 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() { |