Generated by Spark: Fix all reported errors.

This commit is contained in:
2026-01-16 16:54:03 +00:00
committed by GitHub
parent 0845a93842
commit 971ec69b89
3 changed files with 41 additions and 2 deletions

View File

@@ -848,6 +848,7 @@ export function FeatureIdeaCloud() {
fitView
minZoom={0.2}
maxZoom={2}
proOptions={{ hideAttribution: true }}
defaultEdgeOptions={{
type: 'default',
animated: false,

View File

@@ -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);

View File

@@ -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
}
})