Skip to content

Commit

Permalink
issue #27: check all empty values at once
Browse files Browse the repository at this point in the history
  • Loading branch information
andreo-k committed Oct 2, 2020
1 parent 712de2b commit 1f4ba9b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/transformer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export class EncryptionTransformer implements ValueTransformer {
constructor(private options: EncryptionOptions) {}

public from(value?: string | null): string | undefined {
if (value === null || value === undefined) {
if (!value) {
return;
}

Expand All @@ -17,7 +17,7 @@ export class EncryptionTransformer implements ValueTransformer {
}

public to(value?: string | null): string | undefined {
if (value === null || value === undefined) {
if (!value) {
return;
}

Expand Down

0 comments on commit 1f4ba9b

Please sign in to comment.