mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 08:26:21 +00:00
fix: user role not found
This commit is contained in:
parent
d587599c8a
commit
7c45663cd1
@ -21,7 +21,16 @@ export class NocoBaseClientPresetPlugin extends Plugin {
|
||||
return config;
|
||||
});
|
||||
this.app.pm.add(NocoBaseBuildInPlugin);
|
||||
await this.loadRemotePlugin();
|
||||
try {
|
||||
await this.loadRemotePlugin();
|
||||
} catch (error) {
|
||||
if (401 === error?.response?.status) {
|
||||
this.app.apiClient.auth.setRole(null);
|
||||
window.location.reload();
|
||||
} else {
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: 现在是先远程加载远程组件的名称,然后再加载本地组件
|
||||
|
Loading…
Reference in New Issue
Block a user