From 41b3482fb3f2f1c6c4e1e145d62fe237e96acfaf Mon Sep 17 00:00:00 2001 From: wkj <278599135@.com> Date: Fri, 17 Jan 2025 16:53:31 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=A4=84=E7=90=86=20this.entityActionAuthD?= =?UTF-8?q?ict[ts]=3F.[entity]=3F.[id]=3F.[checkTypeString]=E5=8F=AF?= =?UTF-8?q?=E8=83=BD=E4=B8=BAundefined=E6=83=85=E5=86=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- es/features/cache.js | 2 +- lib/features/cache.js | 2 +- src/features/cache.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/es/features/cache.js b/es/features/cache.js index b1d64b45..caa1a768 100644 --- a/es/features/cache.js +++ b/es/features/cache.js @@ -365,7 +365,7 @@ export class Cache extends Feature { if (filter && !data && typeof filter.id === 'string') { id = filter.id; ts = this.cacheStore.getLastUpdateTs(); - if (this.entityActionAuthDict[ts]?.[entity]?.[id]?.[checkTypeString].hasOwnProperty(action)) { + if (this.entityActionAuthDict[ts]?.[entity]?.[id]?.[checkTypeString]?.hasOwnProperty(action)) { return this.entityActionAuthDict[ts][entity][id][checkTypeString][action]; } } diff --git a/lib/features/cache.js b/lib/features/cache.js index f02aee3b..6d03bf62 100644 --- a/lib/features/cache.js +++ b/lib/features/cache.js @@ -368,7 +368,7 @@ class Cache extends Feature_1.Feature { if (filter && !data && typeof filter.id === 'string') { id = filter.id; ts = this.cacheStore.getLastUpdateTs(); - if (this.entityActionAuthDict[ts]?.[entity]?.[id]?.[checkTypeString].hasOwnProperty(action)) { + if (this.entityActionAuthDict[ts]?.[entity]?.[id]?.[checkTypeString]?.hasOwnProperty(action)) { return this.entityActionAuthDict[ts][entity][id][checkTypeString][action]; } } diff --git a/src/features/cache.ts b/src/features/cache.ts index e4bd5b30..bbf18910 100644 --- a/src/features/cache.ts +++ b/src/features/cache.ts @@ -506,7 +506,7 @@ export class Cache extends Feature { if (filter && !data && typeof filter.id === 'string') { id = filter.id; ts = this.cacheStore.getLastUpdateTs(); - if (this.entityActionAuthDict[ts]?.[entity]?.[id]?.[checkTypeString].hasOwnProperty(action)) { + if (this.entityActionAuthDict[ts]?.[entity]?.[id]?.[checkTypeString]?.hasOwnProperty(action)) { return this.entityActionAuthDict[ts]![entity]![id]![checkTypeString]![action]!; } } From 4d79a1cdce9fc98f7b4bbbb101a5740252d2392e Mon Sep 17 00:00:00 2001 From: wkj <278599135@qq.com> Date: Sun, 19 Jan 2025 18:25:00 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=A3=B0=E6=98=8E=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E7=9B=AE=E5=BD=95=E5=90=8D=20SUB=5FDIR=5FNAME:=20string;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- typings/react.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/typings/react.d.ts b/typings/react.d.ts index 82bb39eb..b635df72 100644 --- a/typings/react.d.ts +++ b/typings/react.d.ts @@ -10,6 +10,7 @@ declare namespace NodeJS { readonly OAK_PLATFORM: 'web' | 'wechatMp' | 'server' | 'native'; readonly HOST_NAME: string; readonly OAK_DEV_MODE: 'frontend' | 'server'; // frontend:纯前台模式、server:前后台模式 + readonly SUB_DIR_NAME: string; // 项目目录名 } }