mirror of
https://github.com/facebook/docusaurus.git
synced 2025-08-03 08:49:51 +02:00
1 line
No EOL
2 KiB
JavaScript
1 line
No EOL
2 KiB
JavaScript
"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([["40104"],{7523:function(r,n,t){t.r(n),t.d(n,{default:function(){return l}});var e=t(24246);t(27378);var o=t(40424),a=t(98143),i=t(57922),u=t(39468);function l(){return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(u.Z,{children:"Crash outside layout"}),(0,e.jsx)(a.Z,{children:(0,e.jsxs)("main",{className:"container margin-vert--xl",children:[(0,e.jsx)(i.Z,{as:"h1",children:"Error boundary tests"}),(0,e.jsx)("div",{children:(0,e.jsx)(u.Z,{children:"Crash inside layout"})}),(0,e.jsx)(o.Z,{values:{foo:(0,e.jsx)("span",{children:"FooFoo"}),bar:(0,e.jsx)("b",{children:"BarBar"})},children:"{foo} is {bar}"})]})})]})}},39468:function(r,n,t){t.d(n,{Z:function(){return i}});var e=t(24246),o=t(27378);function a(r,n){(null==n||n>r.length)&&(n=r.length);for(var t=0,e=Array(n);t<n;t++)e[t]=r[t];return e}function i(r){var n,t,i=r.children,u=r.message,l=r.cause;var s=(n=(0,o.useState)(!1),t=2,function(r){if(Array.isArray(r))return r}(n)||function(r,n){var t,e,o=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=o){var a=[],i=!0,u=!1;try{for(o=o.call(r);!(i=(t=o.next()).done)&&(a.push(t.value),!n||a.length!==n);i=!0);}catch(r){u=!0,e=r}finally{try{!i&&null!=o.return&&o.return()}finally{if(u)throw e}}return a}}(n,2)||function(r,n){if(r){if("string"==typeof r)return a(r,n);var t=Object.prototype.toString.call(r).slice(8,-1);if("Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return a(r,n)}}(n,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),c=s[0],d=s[1];if(c)throw Error(void 0===u?"Boom!\nSomething bad happened, but you can try again!":u,{cause:l?Error(l):void 0});return(0,e.jsx)("button",{className:"button button--danger",type:"button",onClick:function(){return d(!0)},children:void 0===i?"Boom!":i})}}}]); |