mirror of
https://github.com/misode/misode.github.io.git
synced 2026-04-24 15:47:08 +00:00
Make Spyglass a singleton object
This commit is contained in:
@@ -22,7 +22,7 @@ export function ErrorPanel({ error, prefix, reportable, onDismiss, body: body_,
|
||||
const [stack, setStack] = useState<string | undefined>(undefined)
|
||||
|
||||
const gen = getGenerator(getCurrentUrl())
|
||||
const source = gen ? spyglass?.getFile(spyglass.getUnsavedFileUri(gen)).doc?.getText() : undefined
|
||||
const source = gen ? spyglass?.getFileContents(spyglass.getUnsavedFileUri(version, gen)) : undefined
|
||||
const name = (prefix ?? '') + (error instanceof Error ? error.message : error)
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
Reference in New Issue
Block a user