Browse Source

fix: add property type definition control back

pull/5137/head
Arman Ozak 6 years ago
parent
commit
7423b1cd23
  1. 3
      npm/ng-packs/packages/schematics/src/utils/model.ts

3
npm/ng-packs/packages/schematics/src/utils/model.ts

@ -70,7 +70,8 @@ export function createImportRefsToModelReducer(params: ModelGeneratorParams) {
_interface.properties.forEach(prop => {
prop.refs.forEach(ref => {
const propType = types[ref];
if (propType?.isEnum) toBeImported.push({ type: ref, isEnum: true });
if (!propType) return;
if (propType.isEnum) toBeImported.push({ type: ref, isEnum: true });
else if (parseNamespace(solution, ref) !== model.namespace)
toBeImported.push({ type: ref, isEnum: false });
});

Loading…
Cancel
Save