fng-ui-select 0.12.0-beta.342 → 0.12.0-beta.344
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/fng-ui-select.js +9 -1
package/package.json
CHANGED
package/src/fng-ui-select.js
CHANGED
|
@@ -226,13 +226,21 @@
|
|
|
226
226
|
}
|
|
227
227
|
})
|
|
228
228
|
.catch(function (err) {
|
|
229
|
+
if (err && err.status <= 0) {
|
|
230
|
+
// Timed out, aborted or offline - the next keystroke will search again
|
|
231
|
+
return;
|
|
232
|
+
}
|
|
229
233
|
var msg;
|
|
230
234
|
if (err && err.data && err.data.message) {
|
|
231
235
|
msg = err.data.message;
|
|
232
236
|
} else {
|
|
233
237
|
msg = 'Error ' + err.status + ': ' + err.statusText + ' - ' + err.data;
|
|
234
238
|
}
|
|
235
|
-
$scope.showError
|
|
239
|
+
if (typeof $scope.showError === 'function') {
|
|
240
|
+
$scope.showError(msg);
|
|
241
|
+
} else {
|
|
242
|
+
console.error(msg);
|
|
243
|
+
}
|
|
236
244
|
});
|
|
237
245
|
}
|
|
238
246
|
} else {
|