Fix JS exception where localStorage is empty
parent
5eefb6fa67
commit
c63ddbda5c
|
@ -5,8 +5,9 @@ var updateCache = function() {
|
||||||
}
|
}
|
||||||
|
|
||||||
var primeCache = function() {
|
var primeCache = function() {
|
||||||
strCache = window.localStorage.getItem('cache').split(",") || []; // Augh.
|
var string = window.localStorage.getItem('cache') || "";
|
||||||
cache = [];
|
var strCache = string.split(",");
|
||||||
|
var cache = [];
|
||||||
strCache.map(function(item) {
|
strCache.map(function(item) {
|
||||||
cache[cache.length] = (item == 'true');
|
cache[cache.length] = (item == 'true');
|
||||||
setRowValue(cache.length, cache[cache.length-1]);
|
setRowValue(cache.length, cache[cache.length-1]);
|
||||||
|
|
Loading…
Reference in New Issue