mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-09-23 02:53:29 +00:00
Fix #17: Remember state of book summary panel
This commit is contained in:
@@ -15,8 +15,10 @@ define(function(){
|
||||
get: function(key, def) {
|
||||
key = baseKey+":"+key;
|
||||
try {
|
||||
return JSON.parse(localStorage[key]) || def;
|
||||
var v = JSON.parse(localStorage[key]);
|
||||
return v == null ? def : v;;
|
||||
} catch(err) {
|
||||
console.error(err);
|
||||
return localStorage[key] || def;
|
||||
}
|
||||
},
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user