Skip to content

Commit

Permalink
fix: add type check on subfactories creation
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgebodega committed Feb 9, 2022
1 parent 0f4b37e commit 2b2883b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/subfactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ export class Subfactory<T> {
}

create() {
if (this.count) {
if (this.count !== undefined) {
return this.factoryInstance.createMany(this.count, this.values)
}

return this.factoryInstance.create(this.values)
}

make() {
if (this.count) {
if (this.count !== undefined) {
return this.factoryInstance.makeMany(this.count, this.values)
}

Expand Down

0 comments on commit 2b2883b

Please sign in to comment.