refactor(RouterProvider, chromeStorage, useContextMenuData): 更新存储获取逻辑以移除默认值参数

- 在 RouterProvider 和 useContextMenuData 中更新对 storageUtil.get 的调用,移除默认值参数,简化逻辑。
- 修改 chromeStorage 中的 get 方法签名,确保在没有默认值时返回可选类型,并添加相应的单元测试以验证类型推断。
This commit is contained in:
雨霖铃
2026-06-19 20:47:43 +08:00
parent ed383dd319
commit 47d74f999e
4 changed files with 26 additions and 9 deletions
+1 -1
View File
@@ -193,7 +193,7 @@ export function RouterProvider({
// Check storage for pending context menu data
storageUtil
.get('contextMenu/pendingData', undefined)
.get('contextMenu/pendingData')
.then((pendingData) => {
if (
pendingData &&