mirror of
https://github.com/strapi/strapi.git
synced 2025-12-12 07:27:46 +00:00
Update content type builder storeData.js file for adapting with login
This commit is contained in:
parent
c3ee5575c9
commit
d9e3d80a22
0
packages/strapi-helper-plugin/lib/src/utils/auth.js
Normal file
0
packages/strapi-helper-plugin/lib/src/utils/auth.js
Normal file
@ -9,7 +9,10 @@ const stringify = JSON.stringify;
|
||||
export const storeData = {
|
||||
clearAppStorage() {
|
||||
if (localStorage) {
|
||||
return localStorage.clear();
|
||||
localStorage.removeItem(CONTENT_TYPE);
|
||||
localStorage.removeItem(IS_MODEL_TEMPORARY);
|
||||
localStorage.removeItem(MENU);
|
||||
return localStorage.removeItem(MODEL);
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@ -30,6 +30,7 @@ module.exports = function() {
|
||||
try {
|
||||
const strapi = function () {
|
||||
try {
|
||||
console.log(path.resolve(process.cwd(), 'node_modules', 'strapi'));
|
||||
return require(path.resolve(process.cwd(), 'node_modules', 'strapi'));
|
||||
} catch (e) {
|
||||
return require('strapi');
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user