Skip to content

Commit

Permalink
If getMemberInfo component is not available, handle crash
Browse files Browse the repository at this point in the history
Signed-off-by: worksofliam <[email protected]>
  • Loading branch information
worksofliam committed Feb 21, 2025
1 parent 827d05e commit 069aaaa
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/api/IBMiContent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -766,7 +766,12 @@ export default class IBMiContent {
*/
getMemberInfo(library: string, sourceFile: string, member: string) {
const component = this.ibmi.getComponent<GetMemberInfo>(GetMemberInfo.ID)!;
return component.getMemberInfo(this.ibmi, library, sourceFile, member);

if (component) {
return component.getMemberInfo(this.ibmi, library, sourceFile, member);
} else {
return Promise.resolve(undefined);
}
}

/**
Expand Down

0 comments on commit 069aaaa

Please sign in to comment.