mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-25 09:26:27 +03:00
Fix sources rendering [ci skip]
This commit is contained in:
parent
ea2a686cf7
commit
c922f8e8b0
|
@ -15,7 +15,7 @@ import Link from '../components/link'
|
|||
import Grid from '../components/grid'
|
||||
import Infobox from '../components/infobox'
|
||||
import Accordion from '../components/accordion'
|
||||
import { join, arrayToObj, abbrNum, markdownToReact } from '../components/util'
|
||||
import { join, arrayToObj, abbrNum, markdownToReact, isString } from '../components/util'
|
||||
|
||||
const MODEL_META = {
|
||||
core: 'Vocabulary, syntax, entities, vectors',
|
||||
|
@ -109,7 +109,7 @@ function formatModelMeta(data) {
|
|||
}
|
||||
|
||||
function formatSources(data = []) {
|
||||
const sources = Array.isArray(data) ? data.map(s => ({ name: s })) : data
|
||||
const sources = data.map(s => (isString(s) ? { name: s } : s))
|
||||
return sources.map(({ name, url, author }, i) => (
|
||||
<>
|
||||
{i > 0 && ', '}
|
||||
|
|
Loading…
Reference in New Issue
Block a user