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 9bfaf984c1
commit 498b0ee017

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])
} }
} }