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