mirror of
https://github.com/johndoe6345789/low-code-react-app-b.git
synced 2026-04-24 13:44:54 +00:00
Generated by Spark: Fix all reported errors.
This commit is contained in:
@@ -848,6 +848,7 @@ export function FeatureIdeaCloud() {
|
||||
fitView
|
||||
minZoom={0.2}
|
||||
maxZoom={2}
|
||||
proOptions={{ hideAttribution: true }}
|
||||
defaultEdgeOptions={{
|
||||
type: 'default',
|
||||
animated: false,
|
||||
|
||||
@@ -20,6 +20,16 @@
|
||||
}
|
||||
}
|
||||
|
||||
@layer utilities {
|
||||
.react-flow__renderer {
|
||||
will-change: transform;
|
||||
}
|
||||
|
||||
.react-flow__node {
|
||||
will-change: transform;
|
||||
}
|
||||
}
|
||||
|
||||
:root {
|
||||
--background: oklch(0.14 0.02 250);
|
||||
--foreground: oklch(0.93 0.005 250);
|
||||
|
||||
32
src/main.tsx
32
src/main.tsx
@@ -10,20 +10,48 @@ import "./main.css"
|
||||
import "./styles/theme.css"
|
||||
import "./index.css"
|
||||
|
||||
const isResizeObserverError = (message: string | undefined): boolean => {
|
||||
if (!message) return false
|
||||
return (
|
||||
message.includes('ResizeObserver loop') ||
|
||||
(message.includes('ResizeObserver') && message.includes('notifications'))
|
||||
)
|
||||
}
|
||||
|
||||
const originalError = console.error
|
||||
console.error = (...args) => {
|
||||
if (
|
||||
typeof args[0] === 'string' &&
|
||||
args[0].includes('ResizeObserver loop completed with undelivered notifications')
|
||||
isResizeObserverError(args[0])
|
||||
) {
|
||||
return
|
||||
}
|
||||
originalError.call(console, ...args)
|
||||
}
|
||||
|
||||
const originalWarn = console.warn
|
||||
console.warn = (...args) => {
|
||||
if (
|
||||
typeof args[0] === 'string' &&
|
||||
isResizeObserverError(args[0])
|
||||
) {
|
||||
return
|
||||
}
|
||||
originalWarn.call(console, ...args)
|
||||
}
|
||||
|
||||
window.addEventListener('error', (e) => {
|
||||
if (e.message === 'ResizeObserver loop completed with undelivered notifications.') {
|
||||
if (isResizeObserverError(e.message)) {
|
||||
e.stopImmediatePropagation()
|
||||
e.preventDefault()
|
||||
return false
|
||||
}
|
||||
}, true)
|
||||
|
||||
window.addEventListener('unhandledrejection', (e) => {
|
||||
if (e.reason && e.reason.message && isResizeObserverError(e.reason.message)) {
|
||||
e.preventDefault()
|
||||
return false
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user