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 316690f
Show file tree
Hide file tree
Showing 2 changed files with 8,955 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
Loading

0 comments on commit 316690f

Please sign in to comment.