Skip to content

Commit 935784a

Browse files
fix: correct return type of validateTopis to include null (#1979)
1 parent d68febd commit 935784a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lib/validations.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export function validateTopic(topic: string): boolean {
3333
* @param {Array} topics - Array of topics
3434
* @returns {String} If the topics is valid, returns null. Otherwise, returns the invalid one
3535
*/
36-
export function validateTopics(topics: string[]): string {
36+
export function validateTopics(topics: string[]): string | null {
3737
if (topics.length === 0) {
3838
return 'empty_topic_list'
3939
}

0 commit comments

Comments
 (0)