Browse Source

Restore undefined check in promptForEntityEntry

Leszek Wiesner 4 years ago
parent
commit
8b224a4aeb
1 changed files with 1 additions and 1 deletions
  1. 1 1
      cli/src/base/ContentDirectoryCommandBase.ts

+ 1 - 1
cli/src/base/ContentDirectoryCommandBase.ts

@@ -283,7 +283,7 @@ export default abstract class ContentDirectoryCommandBase extends RolesCommandBa
       choices: entityEntries.map(([id, entity]) => {
         const parsedEntityPropertyValues = this.parseEntityPropertyValues(entity, entityClass)
         return {
-          name: (propName && parsedEntityPropertyValues[propName].value?.toString()) || `ID:${id.toString()}`,
+          name: (propName && parsedEntityPropertyValues[propName]?.value?.toString()) || `ID:${id.toString()}`,
           value: id.toString(), // With numbers there are issues with "default"
         }
       }),