fix(app): avoid suspending on pending child path (#30314)
This commit is contained in:
@@ -56,6 +56,7 @@ beforeAll(async () => {
|
|||||||
return options().queryKey?.[1] === "path"
|
return options().queryKey?.[1] === "path"
|
||||||
},
|
},
|
||||||
get data() {
|
get data() {
|
||||||
|
if (options().queryKey?.[1] === "path") throw new Error("pending path data read")
|
||||||
if (options().queryKey?.[1] === "mcp") return options().enabled ? { demo: { status: "disabled" } } : undefined
|
if (options().queryKey?.[1] === "mcp") return options().enabled ? { demo: { status: "disabled" } } : undefined
|
||||||
if (options().queryKey?.[1] === "lsp") return []
|
if (options().queryKey?.[1] === "lsp") return []
|
||||||
if (options().queryKey?.[1] === "providers") return provider
|
if (options().queryKey?.[1] === "providers") return provider
|
||||||
|
|||||||
@@ -200,8 +200,9 @@ export function createChildStoreManager(input: {
|
|||||||
},
|
},
|
||||||
config: {},
|
config: {},
|
||||||
get path() {
|
get path() {
|
||||||
if (pathQuery.data) return pathQuery.data
|
const EMPTY = { state: "", config: "", worktree: "", directory, home: "" }
|
||||||
return { state: "", config: "", worktree: "", directory, home: "" }
|
if (pathQuery.isLoading) return EMPTY
|
||||||
|
return pathQuery.data ?? EMPTY
|
||||||
},
|
},
|
||||||
status: "loading" as const,
|
status: "loading" as const,
|
||||||
agent: [],
|
agent: [],
|
||||||
|
|||||||
Reference in New Issue
Block a user