Skip to content
Merged
Changes from all commits
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
12 changes: 11 additions & 1 deletion src/dashboard/Data/Views/Views.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,13 @@ class Views extends TableView {
.then(results => {
const columns = {};
const computeWidth = str => {
const text = typeof str === 'object' && str !== null ? JSON.stringify(str) : String(str);
let text = str;
if (text === undefined) {
text = '';
} else if (text && typeof text === 'object') {
text = text.__type === 'Date' && text.iso ? text.iso : JSON.stringify(text);
}
text = String(text);
if (typeof document !== 'undefined') {
const canvas =
computeWidth._canvas || (computeWidth._canvas = document.createElement('canvas'));
Expand Down Expand Up @@ -298,6 +304,10 @@ class Views extends TableView {
);
} else if (type === 'Object') {
content = JSON.stringify(value);
} else if (type === 'Date') {
content = value && value.iso ? value.iso : String(value);
} else if (value === undefined) {
content = '';
} else {
content = String(value);
}
Expand Down
Loading