Skip to content
This repository was archived by the owner on May 21, 2025. It is now read-only.

Commit fc6028e

Browse files
authored
Merge pull request #421 from JaZo/issue-420
Normalize return object before we check the status
2 parents 6bbb9f0 + ca74a32 commit fc6028e

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

angucomplete-alt.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -442,13 +442,13 @@
442442
function httpErrorCallback(errorRes, status, headers, config) {
443443
scope.searching = false;
444444

445-
// cancelled/aborted
446-
if (status === 0 || status === -1) { return; }
447-
448445
// normalize return obejct from promise
449446
if (!status && !headers && !config) {
450447
status = errorRes.status;
451448
}
449+
450+
// cancelled/aborted
451+
if (status === 0 || status === -1) { return; }
452452
if (scope.remoteUrlErrorCallback) {
453453
scope.remoteUrlErrorCallback(errorRes, status, headers, config);
454454
}

0 commit comments

Comments
 (0)