Commit 8362aa2
committed
Extract localStorage tests out into a helper method; use in getCurrentValue()
1. Extract the tests for whether or not we have workable localStorage out into
a helper method, so it can be more easily reused
2. Use it in getCurrentValue() too, for the same reasons, as suggested in code
review1 parent d4e2dca commit 8362aa2
1 file changed
+20
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
| 30 | + | |
37 | 31 | | |
38 | 32 | | |
39 | 33 | | |
40 | 34 | | |
41 | 35 | | |
42 | 36 | | |
43 | 37 | | |
44 | | - | |
| 38 | + | |
45 | 39 | | |
46 | 40 | | |
47 | 41 | | |
48 | 42 | | |
49 | 43 | | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
50 | 62 | | |
51 | 63 | | |
52 | 64 | | |
| |||
0 commit comments