fix: 修复权限切换不生效问题 (#2488)

Co-authored-by: 戴文俊 <daiwenjun@qutoutiao.net>
This commit is contained in:
1xuanyuan1 2023-01-18 11:15:46 +08:00 committed by GitHub
parent 4c67d8c388
commit 53b2b23620
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -30,7 +30,7 @@ export function usePermission() {
async function togglePermissionMode() {
appStore.setProjectConfig({
permissionMode:
projectSetting.permissionMode === PermissionModeEnum.BACK
appStore.projectConfig?.permissionMode === PermissionModeEnum.BACK
? PermissionModeEnum.ROUTE_MAPPING
: PermissionModeEnum.BACK,
});