diff --git a/src/lorem.ts b/src/lorem.ts index 39ce9d3f73f..9a4f9e04ae8 100644 --- a/src/lorem.ts +++ b/src/lorem.ts @@ -101,13 +101,10 @@ export class Lorem { * // 'Et rerum a unde tempora magnam sit nisi. * // Et perspiciatis ipsam omnis.' */ - sentences(sentenceCount?: number, separator?: string): string { + sentences(sentenceCount?: number, separator: string = ' '): string { if (sentenceCount == null) { sentenceCount = this.faker.datatype.number({ min: 2, max: 6 }); } - if (separator == null) { - separator = ' '; - } const sentences: string[] = []; for (sentenceCount; sentenceCount > 0; sentenceCount--) { sentences.push(this.faker.lorem.sentence());