From 57fcded80cb8f3fc285d54f7e16b61052aa0de77 Mon Sep 17 00:00:00 2001 From: sumeyyeKurtulus Date: Tue, 16 Jul 2024 15:37:39 +0300 Subject: [PATCH] update: revert the proxy generation condition to cover enum cases --- npm/ng-packs/packages/schematics/src/utils/model.ts | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/npm/ng-packs/packages/schematics/src/utils/model.ts b/npm/ng-packs/packages/schematics/src/utils/model.ts index 3d8e233d89..20055a96c3 100644 --- a/npm/ng-packs/packages/schematics/src/utils/model.ts +++ b/npm/ng-packs/packages/schematics/src/utils/model.ts @@ -91,16 +91,8 @@ export function createImportRefsToModelReducer(params: ModelGeneratorParams) { if (propType.isEnum) { toBeImported.push({ type: ref, isEnum: true }); - } - - if (parseNamespace(solution, ref) !== model.namespace) { - const isEnumImportAvailable = toBeImported.some(importValue => { - return importValue.isEnum && importValue.type === ref; - }); - - if (!isEnumImportAvailable) { - toBeImported.push({ type: ref, isEnum: false }); - } + } else if (parseNamespace(solution, ref) !== model.namespace) { + toBeImported.push({ type: ref, isEnum: false }); } }); });