diff options
author | Xianny <8582774+xianny@users.noreply.github.com> | 2019-01-09 05:50:51 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-09 05:50:51 +0800 |
commit | 27fc640a9eae70813e9f02cda2c27a4509a04591 (patch) | |
tree | 487721d8f59a978e23bb0e5d35b573eae7ec6b0a /packages/pipeline/src/utils/transformers | |
parent | 4689f20b86333d74fa0ccd45b23c560a0a0361b5 (diff) | |
download | dexon-0x-contracts-27fc640a9eae70813e9f02cda2c27a4509a04591.tar dexon-0x-contracts-27fc640a9eae70813e9f02cda2c27a4509a04591.tar.gz dexon-0x-contracts-27fc640a9eae70813e9f02cda2c27a4509a04591.tar.bz2 dexon-0x-contracts-27fc640a9eae70813e9f02cda2c27a4509a04591.tar.lz dexon-0x-contracts-27fc640a9eae70813e9f02cda2c27a4509a04591.tar.xz dexon-0x-contracts-27fc640a9eae70813e9f02cda2c27a4509a04591.tar.zst dexon-0x-contracts-27fc640a9eae70813e9f02cda2c27a4509a04591.zip |
fetch and save copper (#1472)
Fetch and save Copper CRM
Diffstat (limited to 'packages/pipeline/src/utils/transformers')
-rw-r--r-- | packages/pipeline/src/utils/transformers/number_to_bigint.ts | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/packages/pipeline/src/utils/transformers/number_to_bigint.ts b/packages/pipeline/src/utils/transformers/number_to_bigint.ts index 85560c1f0..9736d7c18 100644 --- a/packages/pipeline/src/utils/transformers/number_to_bigint.ts +++ b/packages/pipeline/src/utils/transformers/number_to_bigint.ts @@ -9,8 +9,12 @@ const decimalRadix = 10; // https://github.com/typeorm/typeorm/issues/2400 for more information. export class NumberToBigIntTransformer implements ValueTransformer { // tslint:disable-next-line:prefer-function-over-method - public to(value: number): string { - return value.toString(); + public to(value: number): string | null { + if (value === null || value === undefined) { + return null; + } else { + return value.toString(); + } } // tslint:disable-next-line:prefer-function-over-method |