mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-14 18:01:06 +00:00
fix(parse-component): parse ArrayExpression
This commit is contained in:
parent
1a809c9c3a
commit
77ebd0d1aa
4 changed files with 43 additions and 14 deletions
|
@ -44,7 +44,10 @@ export function parseComponent(source, hooks) {
|
|||
let description = null;
|
||||
|
||||
if (init != null) {
|
||||
if (init.type === "ObjectExpression") {
|
||||
if (
|
||||
init.type === "ObjectExpression" ||
|
||||
init.type === "ArrayExpression"
|
||||
) {
|
||||
value = source.slice(init.start, init.end).replace(/\n/g, " ");
|
||||
type = value;
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue