chore: cleanup
This commit is contained in:
parent
fa20bc296b
commit
7555742bf0
1 changed files with 0 additions and 11 deletions
|
|
@ -30,17 +30,6 @@ if (import.meta.env.DEV && !(root instanceof HTMLElement)) {
|
||||||
|
|
||||||
void initI18n()
|
void initI18n()
|
||||||
|
|
||||||
// Floating UI can call getComputedStyle with non-elements (e.g., null refs, virtual elements).
|
|
||||||
// This happens on all platforms (WebView2 on Windows, WKWebView on macOS), not just Windows.
|
|
||||||
const originalGetComputedStyle = window.getComputedStyle
|
|
||||||
window.getComputedStyle = ((elt: Element, pseudoElt?: string | null) => {
|
|
||||||
if (!(elt instanceof Element)) {
|
|
||||||
// Fall back to a safe element when a non-element is passed.
|
|
||||||
return originalGetComputedStyle(document.documentElement, pseudoElt ?? undefined)
|
|
||||||
}
|
|
||||||
return originalGetComputedStyle(elt, pseudoElt ?? undefined)
|
|
||||||
}) as typeof window.getComputedStyle
|
|
||||||
|
|
||||||
let update: Update | null = null
|
let update: Update | null = null
|
||||||
|
|
||||||
const deepLinkEvent = "opencode:deep-link"
|
const deepLinkEvent = "opencode:deep-link"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue