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 {
382382
383383 applySavedSortOrder ( ) {
384384 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+ }
388390 }
389391 }
390392
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ export default function getDefaultOptions(instance) {
2323 label : instance . translate ( 'Reset sorting' ) ,
2424 action : function ( column ) {
2525 this . sortColumn ( column . colIndex , 'none' ) ;
26- localStorage . set ( 'savedSort' , null ) ;
26+ localStorage . setItem ( 'savedSort' , null ) ;
2727 }
2828 } ,
2929 {
You can’t perform that action at this time.
0 commit comments