If an XHR request fails without a defined fail handler, the following error is thrown:
fail is not a function
It looks like the XHR failure code doesn't check whether fail is actually defined in the settings object:
|
this._settings?.fail(err); |
That will check if _settings exists, but not whether fail is defined on that object. A more correct version (we can assume _settings exists here since it has a url we've already requested): this._settings.fail?.(err);
If an XHR request fails without a defined
failhandler, the following error is thrown:fail is not a functionIt looks like the XHR failure code doesn't check whether
failis actually defined in the settings object:bootstrap-autocomplete/src/resolvers.ts
Line 79 in d9701bf
That will check if
_settingsexists, but not whetherfailis defined on that object. A more correct version (we can assume_settingsexists here since it has aurlwe've already requested):this._settings.fail?.(err);