diff --git a/src/UI/System/Logs/Files/LogFileLayout.js b/src/UI/System/Logs/Files/LogFileLayout.js index a324f8cfa..af8de87a9 100644 --- a/src/UI/System/Logs/Files/LogFileLayout.js +++ b/src/UI/System/Logs/Files/LogFileLayout.js @@ -143,7 +143,11 @@ define( _refreshLogs: function (buttonContext) { this.contents.close(); var promise = this.collection.fetch(); - buttonContext.ui.icon.spinForPromise(promise); + + //Would be nice to spin the icon on the refresh button + if (buttonContext) { + buttonContext.ui.icon.spinForPromise(promise); + } }, _commandComplete: function (options) { diff --git a/src/UI/System/Logs/Table/LogsTableLayout.js b/src/UI/System/Logs/Table/LogsTableLayout.js index 82960ba79..219ebfc1b 100644 --- a/src/UI/System/Logs/Table/LogsTableLayout.js +++ b/src/UI/System/Logs/Table/LogsTableLayout.js @@ -120,7 +120,10 @@ define( _refreshLogs: function (buttonContext) { this.collection.state.currentPage = 1; var promise = this.collection.fetch({ reset: true }); - buttonContext.ui.icon.spinForPromise(promise); + + if (buttonContext) { + buttonContext.ui.icon.spinForPromise(promise); + } }, _commandComplete: function (options) {