diff --git a/packages/cache-canvas/src/index.tsx b/packages/cache-canvas/src/index.tsx index 51f2733ab8..82b57d3795 100644 --- a/packages/cache-canvas/src/index.tsx +++ b/packages/cache-canvas/src/index.tsx @@ -157,8 +157,8 @@ export const CacheCanvas = forwardRef((props: CacheCanvasProps, ref) => { if (canIUse) { const res = window.__megability_bridge__.syncCall('userKVStorage', 'getItem', { key: '${cacheKey}' }); - if (res && res.statusCode === 0 && res.data) { - base64Data = res.data; + if (res && res.statusCode === 0 && res.data && res.data.result) { + base64Data = res.data.result; } } } diff --git a/packages/cache-canvas/src/storage.tsx b/packages/cache-canvas/src/storage.tsx index 43b5ef492f..3e03ab8f01 100644 --- a/packages/cache-canvas/src/storage.tsx +++ b/packages/cache-canvas/src/storage.tsx @@ -47,8 +47,8 @@ export const Storage = { if (canIUse) { const res = window.__megability_bridge__.syncCall('userKVStorage', 'getItem', { key }); - if (res && res.statusCode === 0 && res.data) { - return res.data; + if (res && res.statusCode === 0 && res.data && res.data.result) { + return res.data.result; } } }