Merge pull request #5295 from abpframework/fix/5291

Avoided recursive types to cause an infinite loop in proxy generator schematics
pull/5310/head
Levent Arman Özak 5 years ago committed by GitHub
commit 33130f0756
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -133,7 +133,11 @@ export function createImportRefToInterfaceReducerCreator(params: ModelGeneratorP
return _interface.properties
.reduce<string[]>((refs, prop) => {
prop.refs.forEach(type => !types[type]?.isEnum && refs.push(type));
prop.refs.forEach(type => {
if (types[type]?.isEnum || type === _interface.ref) return;
refs.push(type);
});
return refs;
}, [])
.concat(base ? parseGenerics(typeDef.baseType!).toGenerics() : [])

Loading…
Cancel
Save