Files
klz-cables.com/.pnpm-store/v10/files/64/50cfd59c8c0a4fcdc42a37eda062a5884eebcda61a66df71d4db4fa809828c028d544f13ac1c70f5663d26f81ec2063170bc5dfb14eacc372f7598742a7e78
Marc Mintel 5397309103
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
fix(products): fix breadcrumbs and product filtering (backport from main)
2026-02-24 16:04:21 +01:00

44 lines
1.5 KiB
Plaintext

Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const worldwide = require('../utils/worldwide.js');
const handlers = require('./handlers.js');
let _oldOnUnhandledRejectionHandler = null;
/**
* Add an instrumentation handler for when an unhandled promise rejection is captured.
*
* Use at your own risk, this might break without changelog notice, only used internally.
* @hidden
*/
function addGlobalUnhandledRejectionInstrumentationHandler(
handler,
) {
const type = 'unhandledrejection';
handlers.addHandler(type, handler);
handlers.maybeInstrument(type, instrumentUnhandledRejection);
}
function instrumentUnhandledRejection() {
_oldOnUnhandledRejectionHandler = worldwide.GLOBAL_OBJ.onunhandledrejection;
// Note: The reason we are doing window.onunhandledrejection instead of window.addEventListener('unhandledrejection')
// is that we are using this handler in the Loader Script, to handle buffered rejections consistently
worldwide.GLOBAL_OBJ.onunhandledrejection = function (e) {
const handlerData = e;
handlers.triggerHandlers('unhandledrejection', handlerData);
if (_oldOnUnhandledRejectionHandler) {
// eslint-disable-next-line prefer-rest-params
return _oldOnUnhandledRejectionHandler.apply(this, arguments);
}
return true;
};
worldwide.GLOBAL_OBJ.onunhandledrejection.__SENTRY_INSTRUMENTED__ = true;
}
exports.addGlobalUnhandledRejectionInstrumentationHandler = addGlobalUnhandledRejectionInstrumentationHandler;
//# sourceMappingURL=globalUnhandledRejection.js.map