Merge pull request #537 from vyulabs/fix-js-function-undefiend

Fix promise execution, replace then(...).error(...) to then(...).catc…
This commit is contained in:
Tom Whiston 2018-05-14 01:19:40 +02:00 committed by GitHub
commit 7503c81d8e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -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 () {});

View File

@ -42,7 +42,7 @@ define(['app'], function (app) {
self.hosts = response.data;
cb();
})
.error(function (response) {
.catch(function (response) {
cb(response.data, response.status);
});
}