diff options
Diffstat (limited to 'src/modules/number')
| -rw-r--r-- | src/modules/number/index.ts | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/modules/number/index.ts b/src/modules/number/index.ts index d3f27453..54352fcd 100644 --- a/src/modules/number/index.ts +++ b/src/modules/number/index.ts @@ -12,6 +12,7 @@ export class NumberModule { if (name === 'constructor' || typeof this[name] !== 'function') { continue; } + this[name] = this[name].bind(this); } } @@ -56,6 +57,7 @@ export class NumberModule { `No integer value between ${min} and ${max} found.` ); } + throw new FakerError(`Max ${max} should be greater than min ${min}.`); } |
