Skip to content

Commit

Permalink
Merge branch 'plugin-fix-proposal' of https://github.com/tngmichael/g…
Browse files Browse the repository at this point in the history
…raphql into tngmichael-plugin-fix-proposal
  • Loading branch information
kamilmysliwiec committed Mar 18, 2020
2 parents 6cac726 + d6ef0b7 commit 261afba
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 261afba

Please sign in to comment.