Created
January 15, 2021 12:10
-
-
Save paulmwatson/81dfbc0b1481ff70284b5eae4a2821e1 to your computer and use it in GitHub Desktop.
Careful when using sessionStorage as it coerces null into a string
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sessionStorage.test | |
//=> undefined | |
sessionStorage.test = null | |
//=> null | |
sessionStorage.test | |
//=> "null" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment