Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: resolve typescript component that extend as VueCosntructor #474

Merged
merged 2 commits into from
Jun 27, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix: render default value empty string
  • Loading branch information
elevatebart committed Jun 27, 2019
commit f41869d95684b1411850f904c2622c4424f08aa2
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ function renderShape(props) {
return rows
}

const defaultValueBlacklist = ['null', 'undefined']
const defaultValueBlacklist = ['null', 'undefined', "''", '""']

function renderDefault(prop) {
// Workaround for issue https://github.com/reactjs/react-docgen/issues/221
Expand All @@ -111,7 +111,7 @@ function renderDefault(prop) {
const propName = prop.type.name

if (defaultValueBlacklist.indexOf(prop.defaultValue.value) > -1) {
return <Code>{showSpaces(unquote(prop.defaultValue.value))}</Code>
return <Code>{prop.defaultValue.value}</Code>
} else if (propName === 'func' || propName === 'function') {
return (
<Text
Expand Down