Skip to content

Commit

Permalink
Merge pull request #574 from megazoll/log-bool
Browse files Browse the repository at this point in the history
Add preview for bool and number
  • Loading branch information
skellock committed Dec 22, 2017
2 parents 8cbbc71 + bd1f893 commit cb15ec8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/reactotron-app/App/Commands/LogCommand.js
Expand Up @@ -350,7 +350,7 @@ class LogCommand extends Component {
}

getPreview (message) {
if (typeof message === 'string') {
if (is(String, message)) {
return take(PREVIEW_LENGTH, message)
} else if (is(Object, message)) {
const moreKeys = lt(OBJECT_KEYS_COUNT, length(keys(message)))
Expand All @@ -368,7 +368,7 @@ class LogCommand extends Component {
})

return when(always(moreKeys), replace(/\s\}$/i, ', ...}'))(preview)
} else if (isNil(message)) {
} else if (isNil(message) || is(Boolean, message) || is(Number, message)) {
return String(message)
}
return null
Expand Down

0 comments on commit cb15ec8

Please sign in to comment.