UNPKG

@react-form-builder/core

Version:

React JSON Schema Form Builder to create complex, validated, reusable forms with no deep React knowledge required

34 lines (33 loc) 1.05 kB
import { jsx as i, Fragment as l } from "react/jsx-runtime"; import { useState as u, useEffect as a } from "react"; import { isString as o } from "../../utils/isString.js"; import { isObject as c } from "../../utils/tools.js"; const m = (e) => { if (o(e)) return e; if (e && c(e) && "message" in e) { const r = e.message; if (o(r)) return r; } return ""; }, v = ({ children: e }) => { const [r] = u(globalThis.onerror); return a(() => (globalThis.onerror = (n) => { if (m(n).includes("ResizeObserver")) { const t = document.getElementById( "webpack-dev-server-client-overlay-div" ), s = document.getElementById( "webpack-dev-server-client-overlay" ); return s && s.setAttribute("style", "display: none"), t && t.setAttribute("style", "display: none"), !0; } return !1; }, () => { globalThis.onerror = r; }), [r]), /* @__PURE__ */ i(l, { children: e }); }; export { v as SuppressResizeObserverErrors }; //# sourceMappingURL=SuppressResizeObserverErrors.js.map