(kb: KnowledgeBaseData)
| 238 | |
| 239 | if (contentFilter.length > 0) { |
| 240 | const docCount = (kb: KnowledgeBaseData) => (kb as KnowledgeBaseWithDocCount).docCount ?? 0 |
| 241 | result = result.filter((kb) => { |
| 242 | if (contentFilter.includes('has-docs') && docCount(kb) > 0) return true |
| 243 | if (contentFilter.includes('empty') && docCount(kb) === 0) return true |