From 7ce03de76b465172994f41a55058ea49f3ce27c3 Mon Sep 17 00:00:00 2001 From: caolvchong Date: Tue, 4 Jan 2022 02:15:40 +0800 Subject: [PATCH] fix: use custom decorator on column have a property descriptor (#1070) --- src/model/column/column.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/model/column/column.ts b/src/model/column/column.ts index ef04a1a1..fc73638e 100644 --- a/src/model/column/column.ts +++ b/src/model/column/column.ts @@ -24,7 +24,12 @@ export function Column(...args: any[]): Function | void { } return (target: any, propertyName: string, propertyDescriptor?: PropertyDescriptor) => { - annotate(target, propertyName, propertyDescriptor, args[0]); + annotate( + target, + propertyName, + propertyDescriptor ?? Object.getOwnPropertyDescriptor(target, propertyName), + args[0] + ); }; }