File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -382,9 +382,11 @@ export default class ColumnManager {
382
382
383
383
applySavedSortOrder ( ) {
384
384
let sortingConfig = JSON . parse ( localStorage . getItem ( 'savedSorting' ) ) ;
385
- const columnsToSort = Object . values ( sortingConfig ) ;
386
- for ( let column of columnsToSort ) {
387
- this . sortColumn ( column . colIndex , column . sortOrder ) ;
385
+ if ( sortingConfig ) {
386
+ const columnsToSort = Object . values ( sortingConfig ) ;
387
+ for ( let column of columnsToSort ) {
388
+ this . sortColumn ( column . colIndex , column . sortOrder ) ;
389
+ }
388
390
}
389
391
}
390
392
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ export default function getDefaultOptions(instance) {
23
23
label : instance . translate ( 'Reset sorting' ) ,
24
24
action : function ( column ) {
25
25
this . sortColumn ( column . colIndex , 'none' ) ;
26
- localStorage . set ( 'savedSort' , null ) ;
26
+ localStorage . setItem ( 'savedSort' , null ) ;
27
27
}
28
28
} ,
29
29
{
You can’t perform that action at this time.
0 commit comments