Skip to content

Commit

Permalink
fix(plugin): apply plugin metadata on prototypes
Browse files Browse the repository at this point in the history
  • Loading branch information
kamilmysliwiec committed Mar 19, 2020
1 parent 7947814 commit 7647e2b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/schema-builder/storages/type-metadata.storage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,6 @@ export class TypeMetadataStorageHost {
}

applyPluginMetadata(prototype: Function) {
const classPrototype = prototype;
do {
if (!prototype.constructor) {
return;
Expand All @@ -205,12 +204,12 @@ export class TypeMetadataStorageHost {
properties.forEach(key => {
if (metadata[key].type) {
const { type, ...options } = metadata[key];
addFieldMetadata(type, options, classPrototype, key, undefined, true);
addFieldMetadata(type, options, prototype, key, undefined, true);
} else {
addFieldMetadata(
metadata[key],
undefined,
classPrototype,
prototype,
key,
undefined,
true,
Expand Down

0 comments on commit 7647e2b

Please sign in to comment.