Skip to content

Commit

Permalink
fix: eliminate "Cannot read properties of undefined (reading type)" e…
Browse files Browse the repository at this point in the history
…rror (#5443)

* fix: fix "Cannot read properties of undefined (reading type)" error

* Pull in code review suggestion

Co-authored-by: peternhale <[email protected]>

* fix: move if statement to Line 289

---------

Co-authored-by: peternhale <[email protected]>
  • Loading branch information
daphne-sfdc and peternhale authored Feb 22, 2024
1 parent 2a4ef70 commit 56c7f3d
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -286,9 +286,11 @@ export abstract class RetrieveExecutor<T> extends DeployRetrieveExecutor<T> {
const relativePackageDirs = await SfdxPackageDirectories.getPackageDirectoryPaths();
const output = this.createOutput(result, relativePackageDirs);
channelService.appendLine(output);
PersistentStorageService.getInstance().setPropertiesForFilesRetrieve(
result.response.fileProperties
);
if (result?.response?.fileProperties !== undefined) {
PersistentStorageService.getInstance().setPropertiesForFilesRetrieve(
result.response.fileProperties
);
}
}
}

Expand Down

0 comments on commit 56c7f3d

Please sign in to comment.