Enhance: validate local storage (#4784)

* Validate localStorage with spec

This will help get at the source of errors like #4706 quicker

* Fix settings bugs

Close #4679 as shortcut tooltip setting is now visible.
No need to js/alert when a setting is changed. Probably leftover bugging

* Add docs and example of reusing specs in bb task

Co-authored-by: Andelf <andelf@gmail.com>
This commit is contained in:
Gabriel Horner
2022-04-01 03:46:52 -04:00
committed by GitHub
parent 28d3cb4658
commit 0ccbe4d046
8 changed files with 109 additions and 5 deletions

View File

@@ -4,8 +4,10 @@
[lambdaisland.glogi :as log]
[expound.alpha :as expound]))
;; disable in production
(when config/dev? (s/check-asserts true))
;; Enabled for all environments. We want asserts to run in production e.g.
;; frontend.storage one is preventing data corruption. If we introduce asserts
;; that are not perf sensitive, we will need to reconsider.
(s/check-asserts true)
(set! s/*explain-out* expound/printer)