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 {
128128 . then ( results => {
129129 const columns = { } ;
130130 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 ) ;
132138 if ( typeof document !== 'undefined' ) {
133139 const canvas =
134140 computeWidth . _canvas || ( computeWidth . _canvas = document . createElement ( 'canvas' ) ) ;
@@ -298,6 +304,10 @@ class Views extends TableView {
298304 ) ;
299305 } else if ( type === 'Object' ) {
300306 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 = '' ;
301311 } else {
302312 content = String ( value ) ;
303313 }
You can’t perform that action at this time.
0 commit comments