fix: config inject error

Signed-off-by: MiaoWoo <admin@yumc.pw>
This commit is contained in:
MiaoWoo 2020-09-25 10:12:28 +08:00
parent fb7e27af82
commit 80111d5ada

View File

@ -81,7 +81,6 @@ export function config(metadata: interfaces.ConfigMetadata = {}) {
let previousMetadata = getPluginConfigMetadata(target) let previousMetadata = getPluginConfigMetadata(target)
previousMetadata.set(metadata.name, metadata) previousMetadata.set(metadata.name, metadata)
Reflect.defineMetadata(METADATA_KEY.config, previousMetadata, target.constructor) Reflect.defineMetadata(METADATA_KEY.config, previousMetadata, target.constructor)
Reflect.defineMetadata(METADATA_KEY.config, metadata, target[key])
} }
} }