File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -128,7 +128,13 @@ class Views extends TableView {
128
128
. then ( results => {
129
129
const columns = { } ;
130
130
const computeWidth = str => {
131
- const text = typeof str === 'object' && str !== null ? JSON . stringify ( str ) : String ( str ) ;
131
+ let text = str ;
132
+ if ( text === undefined ) {
133
+ text = '' ;
134
+ } else if ( text && typeof text === 'object' ) {
135
+ text = text . __type === 'Date' && text . iso ? text . iso : JSON . stringify ( text ) ;
136
+ }
137
+ text = String ( text ) ;
132
138
if ( typeof document !== 'undefined' ) {
133
139
const canvas =
134
140
computeWidth . _canvas || ( computeWidth . _canvas = document . createElement ( 'canvas' ) ) ;
@@ -298,6 +304,10 @@ class Views extends TableView {
298
304
) ;
299
305
} else if ( type === 'Object' ) {
300
306
content = JSON . stringify ( value ) ;
307
+ } else if ( type === 'Date' ) {
308
+ content = value && value . iso ? value . iso : String ( value ) ;
309
+ } else if ( value === undefined ) {
310
+ content = '' ;
301
311
} else {
302
312
content = String ( value ) ;
303
313
}
You can’t perform that action at this time.
0 commit comments