ensure localstorage is available before persisting column visibility state