Skip to content

Commit

Permalink
Merge pull request #98 from filefoxper/[email protected]
Browse files Browse the repository at this point in the history
  • Loading branch information
filefoxper authored Dec 30, 2024
2 parents 63d4f76 + ec5f2c2 commit 150e520
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 7 deletions.
6 changes: 5 additions & 1 deletion docs/react-effect/log.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,4 +153,8 @@
# v18.5.8

* fix the problem about SessionState type has no `online` property.
* fix the problem about Strategy.response.* callback can not work cleanups in time.
* fix the problem about Strategy.response.* callback can not work cleanups in time.

# v18.5.9

* fix the problem about `useLazyComponent` can not support `memo` Component.
6 changes: 5 additions & 1 deletion docs/zh/react-effect/log.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,4 +154,8 @@
## v18.5.8

* 修复 SessionState online 字段未暴露的问题。
* 修复 Strategy.response 系列接口 cleanup 副作用清理函数运行时机问题。
* 修复 Strategy.response 系列接口 cleanup 副作用清理函数运行时机问题。

## v18.5.9

* 修复 useLazyComponent 解析 memo 组件时报错的问题。
2 changes: 1 addition & 1 deletion packages/@airma/react-effect/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"private": false,
"name": "@airma/react-effect",
"version": "18.5.8",
"version": "18.5.9",
"description": "This is a react async state management tool",
"license": "MIT",
"author": "Jimmy.Harding",
Expand Down
5 changes: 1 addition & 4 deletions packages/@airma/react-effect/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -722,10 +722,7 @@ export function useLazyComponent<T extends LazyComponentSupportType<any>>(

function extractComponent(compLike: T | { default: T }): T {
const defaultCompLike = compLike as { default: T };
if (
defaultCompLike.default &&
typeof defaultCompLike.default === 'function'
) {
if (defaultCompLike.default) {
return defaultCompLike.default;
}
return compLike as T;
Expand Down

0 comments on commit 150e520

Please sign in to comment.