Skip to content

Commit

Permalink
added optional chaining
Browse files Browse the repository at this point in the history
  • Loading branch information
cs-raj committed Mar 8, 2024
1 parent 26af493 commit c918b37
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ export default class ContentTypesImport extends BaseClass {

async updatePendingExtensions(): Promise<any> {
let apiContent = fsUtil.readFile(this.extPendingPath) as Record<string, any>[];
if (apiContent.length === 0) {
if (apiContent?.length === 0) {
log(this.importConfig, `No extensions found to be updated.`, 'success');
return;
}
Expand Down

0 comments on commit c918b37

Please sign in to comment.