Skip to content

Commit

Permalink
Update dash/extract-meta.js
Browse files Browse the repository at this point in the history
Co-authored-by: Alex Johnson <johnson.alex.c@gmail.com>
  • Loading branch information
T4rk1n and alexcjohnson committed Apr 27, 2022
1 parent 74f4dea commit 79bcd41
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions dash/extract-meta.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ const reArray = new RegExp(`(${unionSupport.join('|')})\\[\\]`);

const isArray = rawType => reArray.test(rawType);

const isUnionlitteral = typeObj =>
const isUnionLiteral = typeObj =>
typeObj.types.every(
t =>
t.getFlags() &
Expand Down Expand Up @@ -289,7 +289,7 @@ function gatherComponents(sources, components = {}) {
const raw = name;

if (propType.isUnion()) {
if (isUnionlitteral(propType)) {
if (isUnionLiteral(propType)) {
return {...getEnum(propType), raw};
} else if (raw.includes('|')) {
return {...getUnion(propType, propObj), raw};
Expand Down Expand Up @@ -328,7 +328,7 @@ function gatherComponents(sources, components = {}) {
name = 'shape';
// If the type is declared as union it will have a types attribute.
if (propType.types && propType.types.length) {
if (isUnionlitteral(propType)) {
if (isUnionLiteral(propType)) {
return {...getEnum(propType), raw};
}
return {...getUnion(propType, propObj), raw};
Expand Down

0 comments on commit 79bcd41

Please sign in to comment.