mirror of
https://github.com/semaphoreui/semaphore.git
synced 2024-11-23 20:35:24 +01:00
Merge pull request #537 from vyulabs/fix-js-function-undefiend
Fix promise execution, replace then(...).error(...) to then(...).catc…
This commit is contained in:
commit
7503c81d8e
@ -21,7 +21,7 @@ define(function () {
|
||||
}).catch(function (errorResponse) {
|
||||
swal('Error', 'Setting password failed, API responded with HTTP ' + errorResponse.status, 'error');
|
||||
});
|
||||
}).error(function (response) {
|
||||
}).catch(function (response) {
|
||||
swal('Error', 'API responded with HTTP ' + response.status, 'error');
|
||||
});
|
||||
}, function () {});
|
||||
|
@ -42,7 +42,7 @@ define(['app'], function (app) {
|
||||
self.hosts = response.data;
|
||||
cb();
|
||||
})
|
||||
.error(function (response) {
|
||||
.catch(function (response) {
|
||||
cb(response.data, response.status);
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user