mirror of
https://github.com/octoleo/syncthing.git
synced 2024-12-31 22:11:51 +00:00
gui: Check data before calling .reverse() (#5793)
This commit is contained in:
parent
abd363e8bb
commit
6b1d7ac727
@ -726,6 +726,11 @@ angular.module('syncthing.core')
|
||||
|
||||
var refreshGlobalChanges = debounce(function () {
|
||||
$http.get(urlbase + "/events/disk?limit=25").success(function (data) {
|
||||
if (!data) {
|
||||
// For reasons unknown this is called with data being the empty
|
||||
// string on shutdown, causing an error on .reverse().
|
||||
return;
|
||||
}
|
||||
data = data.reverse();
|
||||
$scope.globalChangeEvents = data;
|
||||
console.log("refreshGlobalChanges", data);
|
||||
|
Loading…
Reference in New Issue
Block a user