diff --git a/npm/ng-packs/packages/schematics/src/utils/model.ts b/npm/ng-packs/packages/schematics/src/utils/model.ts index 688d72123a..04eea19524 100644 --- a/npm/ng-packs/packages/schematics/src/utils/model.ts +++ b/npm/ng-packs/packages/schematics/src/utils/model.ts @@ -70,8 +70,9 @@ export function createImportRefsToModelReducer(params: ModelGeneratorParams) { _interface.properties.forEach(prop => { prop.refs.forEach(ref => { const propType = types[ref]; - if (propType && parseNamespace(solution, ref) !== model.namespace) - toBeImported.push({ type: ref, isEnum: propType?.isEnum }); + if (propType?.isEnum) toBeImported.push({ type: ref, isEnum: true }); + else if (parseNamespace(solution, ref) !== model.namespace) + toBeImported.push({ type: ref, isEnum: false }); }); }); });