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 CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "fng-ui-select",
3
3
  "author": "Mark Chapman <support@forms-angular.org>",
4
- "version": "0.12.0-beta.342",
4
+ "version": "0.12.0-beta.344",
5
5
  "description": "angular-ui-select plugin for forms-angular",
6
6
  "repository": {
7
7
  "type": "git",
@@ -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(msg);
239
+ if (typeof $scope.showError === 'function') {
240
+ $scope.showError(msg);
241
+ } else {
242
+ console.error(msg);
243
+ }
236
244
  });
237
245
  }
238
246
  } else {