Skip to content

Commit

Permalink
fix potential error with zero data in data table
Browse files Browse the repository at this point in the history
  • Loading branch information
aaemnnosttv committed Nov 7, 2019
1 parent 2644c70 commit b01d4fd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion assets/js/components/data-table.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export const getDataTableFromData = ( data, headers, options ) => {
<table
className={ `
googlesitekit-table__wrapper
googlesitekit-table__wrapper--${ data[ 0 ].length }-col
googlesitekit-table__wrapper--${ data && data[ 0 ] ? data[ 0 ].length : 1 }-col
` }
>
<thead className="googlesitekit-table__head">
Expand Down

0 comments on commit b01d4fd

Please sign in to comment.