feat: implement admin knowledge extraction system with document upload and AI pipeline integration
This commit is contained in:
@@ -11,13 +11,13 @@ export const storage = {
|
||||
* @param {string} key - e.g. 'kb:topics'
|
||||
* @returns {any}
|
||||
*/
|
||||
get(key) {
|
||||
get(key, defaultValue = null) {
|
||||
try {
|
||||
const item = window.localStorage.getItem(STORAGE_PREFIX + key);
|
||||
return item ? JSON.parse(item) : null;
|
||||
return item ? JSON.parse(item) : defaultValue;
|
||||
} catch (e) {
|
||||
console.error(`Error reading ${key} from storage:`, e);
|
||||
return null;
|
||||
return defaultValue;
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user