We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
validateTopis
null
1 parent d68febd commit 935784aCopy full SHA for 935784a
src/lib/validations.ts
@@ -33,7 +33,7 @@ export function validateTopic(topic: string): boolean {
33
* @param {Array} topics - Array of topics
34
* @returns {String} If the topics is valid, returns null. Otherwise, returns the invalid one
35
*/
36
-export function validateTopics(topics: string[]): string {
+export function validateTopics(topics: string[]): string | null {
37
if (topics.length === 0) {
38
return 'empty_topic_list'
39
}
0 commit comments