Skip to content

Commit

Permalink
fix(): some changes not correctly applied
Browse files Browse the repository at this point in the history
  • Loading branch information
tngmichael committed Mar 18, 2020
1 parent 62008d4 commit d6ef0b7
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/plugin/visitors/model-class.visitor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@ export class ModelClassVisitor {

const visitNode = (node: ts.Node): ts.Node => {
if (ts.isClassDeclaration(node)) {
// clear all properties on restart
const classMetadata = this.getClassMetadata(
node as ts.ClassDeclaration,
);
if (classMetadata) {
metadataHostMap.delete((node as ts.ClassDeclaration).name.getText());
}
node = ts.visitEachChild(node, visitNode, ctx);
return this.addMetadataFactory(node as ts.ClassDeclaration);
} else if (ts.isPropertyDeclaration(node)) {
Expand Down

0 comments on commit d6ef0b7

Please sign in to comment.