fix: getEncryptedColumn for empty token (#4507)

This commit is contained in:
Denis
2022-12-03 08:28:43 +05:00
committed by GitHub
parent 4d1bbf3f80
commit 571f812771

View File

@@ -17,6 +17,9 @@ export default function Encrypted(target: any, propertyKey: string) {
* Get the value of an encrypted column given the target and the property key.
*/
export function getEncryptedColumn(target: any, propertyKey: string): string {
if (!target.getDataValue(propertyKey)) {
return "";
}
try {
return Reflect.getMetadata(key, target, propertyKey).get.call(target);
} catch (err) {