mirror of
https://github.com/maximebf/php-debugbar.git
synced 2025-07-25 10:41:55 +02:00
Added catch to promise for window.fetch wrapper to avoid "Uncaught (in promise) DOMException: The user aborted a request." errors. (#585)
Co-authored-by: Filippov Alexander <swayalex.work@gmail.com>
This commit is contained in:
committed by
GitHub
parent
87f04a2762
commit
d6566027f1
@@ -1175,6 +1175,9 @@ if (typeof(PhpDebugBar) == 'undefined') {
|
||||
|
||||
promise.then(function (response) {
|
||||
self.handle(response);
|
||||
}).catch(function(reason) {
|
||||
// Fetch request failed or aborted via AbortController.abort().
|
||||
// Catch is required to not trigger React's error handler.
|
||||
});
|
||||
|
||||
return promise;
|
||||
|
Reference in New Issue
Block a user