Browse Source

refactor(layouts/toolbar): coerce number type getters in session manager

Josh Habdas 10 months ago
parent
commit
8134b78af0
Signed by: Josh Habdas <jhabdas@protonmail.com> GPG Key ID: B148B31154C75A74
1 changed files with 3 additions and 3 deletions
  1. 3
    3
      layouts/partials/modules/toxic-swamp/toolbar.html

+ 3
- 3
layouts/partials/modules/toxic-swamp/toolbar.html View File

@@ -77,19 +77,19 @@
77 77
         sessionStorage.setItem('shouldmine', shouldMine);
78 78
       }
79 79
       static get totalHashes () {
80
-        return Number(sessionStorage.getItem('totalhashes'));
80
+        return sessionStorage.getItem('totalhashes') - null;
81 81
       }
82 82
       static set totalHashes (total) {
83 83
         sessionStorage.setItem('totalhashes', total);
84 84
       }
85 85
       static get throttle () {
86
-        return sessionStorage.getItem('throttle');
86
+        return sessionStorage.getItem('throttle') - null;
87 87
       }
88 88
       static set throttle (throttle) {
89 89
         sessionStorage.setItem('throttle', throttle);
90 90
       }
91 91
       static get hashrate () {
92
-        return sessionStorage.getItem('hashrate');
92
+        return sessionStorage.getItem('hashrate') - null;
93 93
       }
94 94
       static set hashrate (hashrate) {
95 95
         sessionStorage.setItem('hashrate', hashrate);

Loading…
Cancel
Save