Disable model storage for now (#3805)

Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
Andrey Sobolev 2023-10-06 23:15:22 +07:00 committed by GitHub
parent daec3b8e17
commit 835588cfd3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -63,19 +63,19 @@ export default async () => {
filterModel ? [...getPlugins(), ...(getMetadata(clientPlugin.metadata.ExtraPlugins) ?? [])] : undefined, filterModel ? [...getPlugins(), ...(getMetadata(clientPlugin.metadata.ExtraPlugins) ?? [])] : undefined,
{ {
load: async () => { load: async () => {
if (typeof localStorage !== 'undefined') { // if (typeof localStorage !== 'undefined') {
const dta = localStorage.getItem('stored_model_' + token) ?? null // const dta = localStorage.getItem('stored_model_' + token) ?? null
if (dta === null) { // if (dta === null) {
return [] // return []
} // }
return JSON.parse(dta) // return JSON.parse(dta)
} // }
return [] return []
}, },
store: async (txes) => { store: async (txes) => {
if (typeof localStorage !== 'undefined') { // if (typeof localStorage !== 'undefined') {
localStorage.setItem('stored_model_' + token, JSON.stringify(txes)) // localStorage.setItem('stored_model_' + token, JSON.stringify(txes))
} // }
} }
} }
) )