mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-05 17:51:40 +09:00
Fix inconsistent unhandledrejection behavior when polyfill is used
This commit is contained in:
parent
87e34246f2
commit
083abbeacd
1 changed files with 9 additions and 0 deletions
|
|
@ -1111,6 +1111,15 @@ window.addEventListener('popstate', function(event) {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Fix for browsers that don't support the unhandledrejection event
|
||||||
|
if (typeof Promise._unhandledRejectionFn !== 'undefined') {
|
||||||
|
Promise._unhandledRejectionFn = function(error) {
|
||||||
|
if (error['_rx_ajax_error']) {
|
||||||
|
alert(error.message.trim());
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* =================
|
* =================
|
||||||
* jQuery extensions
|
* jQuery extensions
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue