UNPKG

next

Version:

The React Framework

45 lines (44 loc) • 1.43 kB
// This module is bundled separately into user code and the precompiled App // Router runtime. Use the global symbol registry so both copies recognize the // same browser bailout reason. "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); 0 && (module.exports = { createReactBrowserBailoutReason: null, getReactBrowserBailoutReason: null, isNextBrowserBailoutError: null }); function _export(target, all) { for(var name in all)Object.defineProperty(target, name, { enumerable: true, get: all[name] }); } _export(exports, { createReactBrowserBailoutReason: function() { return createReactBrowserBailoutReason; }, getReactBrowserBailoutReason: function() { return getReactBrowserBailoutReason; }, isNextBrowserBailoutError: function() { return isNextBrowserBailoutError; } }); const REACT_BROWSER_BAILOUT_REASON = Symbol.for('next.browser-bailout-reason'); function createReactBrowserBailoutReason(reason) { return { $$typeof: REACT_BROWSER_BAILOUT_REASON, reason }; } function getReactBrowserBailoutReason(error) { const cause = error?.cause; return cause?.$$typeof === REACT_BROWSER_BAILOUT_REASON ? cause.reason : undefined; } function isNextBrowserBailoutError(error) { return getReactBrowserBailoutReason(error) !== undefined; } //# sourceMappingURL=react-browser-bailout.js.map