mirror of
https://codeberg.org/kbruen/kai.infotren.git
synced 2025-02-22 17:19:37 +02:00
Improve promise handling
This commit is contained in:
parent
2aa147060a
commit
5c95dec36d
1 changed files with 3 additions and 1 deletions
|
@ -316,9 +316,11 @@ function refresh() {
|
|||
}
|
||||
return response.json()
|
||||
}).then(function (response) {
|
||||
if (!response) {
|
||||
return
|
||||
}
|
||||
trainData = response
|
||||
onTrainData(response)
|
||||
}).then(function () {
|
||||
reschedule()
|
||||
}).catch(function (e) {
|
||||
// Check in 1 second if network error
|
||||
|
|
Loading…
Add table
Reference in a new issue