Skip to content

Commit

Permalink
Fix sortDirection condition and add semi-colon
Browse files Browse the repository at this point in the history
  • Loading branch information
n3tr authored and n-tr committed Oct 11, 2019
1 parent ce11684 commit c7a9d53
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/MUIDataTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ class MUIDataTable extends React.Component {
};

if (typeof column === 'object') {
const options = { ...column.options }
const options = { ...column.options };
if (options) {
if (options.display !== undefined) {
options.display = options.display.toString();
Expand All @@ -422,7 +422,7 @@ class MUIDataTable extends React.Component {
options.sortDirection = 'none';
}

if (column.options.sortDirection !== undefined && column.options.sortDirection !== 'none') {
if (options.sortDirection !== undefined && options.sortDirection !== 'none') {
if (sortDirectionSet) {
console.error('sortDirection is set for more than one column. Only the first column will be considered.');
options.sortDirection = 'none';
Expand Down

0 comments on commit c7a9d53

Please sign in to comment.