diff --git a/npm/ng-packs/packages/schematics/src/utils/model.ts b/npm/ng-packs/packages/schematics/src/utils/model.ts index 119323e95d..a1485858d4 100644 --- a/npm/ng-packs/packages/schematics/src/utils/model.ts +++ b/npm/ng-packs/packages/schematics/src/utils/model.ts @@ -182,7 +182,7 @@ export function createRefToImportReducerCreator(params: ModelGeneratorParams) { } function isOptionalProperty(prop: PropertyDef) { - return prop.typeSimple.endsWith('?') || (prop.typeSimple === 'string' && !prop.isRequired); + return prop.typeSimple.endsWith('?') || !prop.isRequired; } export function parseBaseTypeWithGenericTypes(type: string): string[] {