Skip to content

Commit d981b57

Browse files
authored
Merge pull request #323 from codefori/fix/fetch-self-data
fix: check if SELF data is undefined
2 parents e1189a3 + 67c4122 commit d981b57

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/aiProviders/continue/continueContextProvider.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ export class db2ContextProvider implements IContextProvider {
8787
const result = await selected.job
8888
.query<SelfCodeNode>(content)
8989
.execute(10000);
90-
if (result.success) {
90+
if (result.success && result.data) {
9191
const data: SelfCodeNode[] = result.data.map((row) => ({
9292
...row,
9393
INITIAL_STACK: this.tryParseJson(row),

src/views/jobManager/selfCodes/selfCodesResultsView.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ export class selfCodesResultsView implements TreeDataProvider<any> {
145145

146146
try {
147147
const result = await selected.job.query<SelfCodeNode>(content).execute(10000);
148-
if (result.success) {
148+
if (result.success && result.data) {
149149
const data: SelfCodeNode[] = result.data.map((row) => ({
150150
...row,
151151
INITIAL_STACK: JSON.parse(row.INITIAL_STACK as unknown as string)

0 commit comments

Comments
 (0)