Browse Source

update: revert the proxy generation condition to cover enum cases

pull/20230/head
sumeyyeKurtulus 2 years ago
parent
commit
57fcded80c
  1. 12
      npm/ng-packs/packages/schematics/src/utils/model.ts

12
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 });
}
});
});

Loading…
Cancel
Save