diff --git a/docs/docs/playground/demos/Playground/codes/reactive.ts b/docs/docs/playground/demos/Playground/codes/reactive.ts
index 2de83785..6672d848 100644
--- a/docs/docs/playground/demos/Playground/codes/reactive.ts
+++ b/docs/docs/playground/demos/Playground/codes/reactive.ts
@@ -36,7 +36,7 @@ const change = () => {
},0);
};
-render();
+render();
`;
const dict_atomx = `
diff --git a/packages/helux-core/src/consts/user.ts b/packages/helux-core/src/consts/user.ts
index 0959da4c..2bc5e459 100644
--- a/packages/helux-core/src/consts/user.ts
+++ b/packages/helux-core/src/consts/user.ts
@@ -1,6 +1,6 @@
import { VER as limuVer } from 'limu';
-export const VER = '4.2.0';
+export const VER = '4.2.1';
export const LIMU_VER = limuVer;
diff --git a/packages/helux-core/src/types/api.d.ts b/packages/helux-core/src/types/api.d.ts
index 11a18163..b6dbe6fe 100644
--- a/packages/helux-core/src/types/api.d.ts
+++ b/packages/helux-core/src/types/api.d.ts
@@ -1,6 +1,6 @@
/*
|------------------------------------------------------------------------------------------------
-| helux-core@4.2.0
+| helux-core@4.2.1
| A state library core that integrates atom, signal, collection dep, derive and watch,
| it supports all react like frameworks ( including react 18 ).
|------------------------------------------------------------------------------------------------
@@ -68,7 +68,7 @@ import type {
} from './base';
export declare const cst: {
- VER: '4.2.0';
+ VER: '4.2.1';
LIMU_VER: string;
EVENT_NAME: {
/** 共享状态创建时的事件 */
diff --git a/packages/helux-utils/src/log.ts b/packages/helux-utils/src/log.ts
index dd1c4d27..31a80f42 100644
--- a/packages/helux-utils/src/log.ts
+++ b/packages/helux-utils/src/log.ts
@@ -23,9 +23,10 @@ export function tryAlert(err: any, options?: IAlertOpts) {
errMsg = err.message;
}
- const canAlert = alertErr ?? isDebug();
- if (canAlert) {
- err && GLOBAL_REF.alert?.(`${prefixLabel}${errMsg}${suffixLabel}`);
+ // 还原为老写法( 无 ?? 和 ?. ),防止某些版本 babel 编译报错
+ const canAlert = typeof alertErr === 'boolean' ? alertErr : isDebug();
+ if (canAlert && GLOBAL_REF.alert) {
+ err && GLOBAL_REF.alert(`${prefixLabel}${errMsg}${suffixLabel}`);
}
logErr && console.error(err);
if (throwErr) {