Antonio-Maranhao closed pull request #1001: Fix table mode to show boolean
values
URL: https://github.com/apache/couchdb-fauxton/pull/1001
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git a/app/addons/documents/index-results/components/results/TableRow.js
b/app/addons/documents/index-results/components/results/TableRow.js
index 6728996d6..b983d86c1 100644
--- a/app/addons/documents/index-results/components/results/TableRow.js
+++ b/app/addons/documents/index-results/components/results/TableRow.js
@@ -37,7 +37,8 @@ export default class TableRow extends React.Component {
const row = this.props.data.selectedFields.map(function (k, i) {
const key = 'tableview-data-cell-' + rowNumber + k + i + el[k];
- const stringified = typeof el[k] === 'object' ? JSON.stringify(el[k],
null, ' ') : el[k];
+ const stringified = ['object', 'boolean'].includes(typeof el[k]) ?
+ JSON.stringify(el[k], null, ' ') : el[k];
return (
<td key={key} title={stringified} onClick={this.onClick.bind(this)}>
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services