#2097: Use localStorage.length instead to get number of entries
It looks like some older browsers are not compatible with the keys() function of jquery.storageapi, but are compatible with just localStorage.length.
This commit is contained in:
@@ -20,7 +20,7 @@
|
||||
}
|
||||
|
||||
Danbooru.Autocomplete.prune_local_storage = function() {
|
||||
if (this.enable_local_storage && $.localStorage.keys().length > 10000) {
|
||||
if (this.enable_local_storage && localStorage.length > 10000) {
|
||||
$.localStorage.removeAll();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user