The current implementation of the transformer returns undefined instead of null when the column is null.
Will it be better if it stick to the same return type as Typeorm.
public from(value?: string | null): string | undefined {
if (!value) {
return; // Should it return value instead?
}
return decryptData(
Buffer.from(value as string, 'base64'),
this.options
).toString('utf8');
}
The current implementation of the transformer returns
undefined
instead ofnull
when the column is null. Will it be better if it stick to the same return type as Typeorm.