Unverified Commit 6ba07eaa authored by Daniel's avatar Daniel Committed by GitHub

Added a fix for nested JSON data type returned from data preview (#161)

parent 7a3bdcd6
...@@ -87,9 +87,12 @@ export class DataPreviewButton extends React.Component<DataPreviewButtonProps, D ...@@ -87,9 +87,12 @@ export class DataPreviewButton extends React.Component<DataPreviewButtonProps, D
getSanitizedValue(value) { getSanitizedValue(value) {
// Display the string interpretation of the following "false-y" values // Display the string interpretation of the following "false-y" values
if (value === 0 || typeof(value) === "boolean") { if (value === 0 || typeof value === "boolean") {
return value.toString(); return value.toString();
} }
if (typeof value === "object") {
return JSON.stringify(value);
}
return value || ''; return value || '';
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment