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,
{
load: async () => {
if (typeof localStorage !== 'undefined') {
const dta = localStorage.getItem('stored_model_' + token) ?? null
if (dta === null) {
return []
}
return JSON.parse(dta)
}
// if (typeof localStorage !== 'undefined') {
// const dta = localStorage.getItem('stored_model_' + token) ?? null
// if (dta === null) {
// return []
// }
// return JSON.parse(dta)
// }
return []
},
store: async (txes) => {
if (typeof localStorage !== 'undefined') {
localStorage.setItem('stored_model_' + token, JSON.stringify(txes))
}
// if (typeof localStorage !== 'undefined') {
// localStorage.setItem('stored_model_' + token, JSON.stringify(txes))
// }
}
}
)