Skip to content

Commit

Permalink
chore: release 4.2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
fantasticsoul committed Jan 18, 2024
1 parent bd449d0 commit 75103a9
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion docs/docs/playground/demos/Playground/codes/reactive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const change = () => {
},0);
};
render(<button onClick={ change } > change { $(reactive.b.b1.b2)}</button>);
render(<button onClick={ change }> change { $(reactive.b.b1.b2)}</button>);
`;

const dict_atomx = `
Expand Down
2 changes: 1 addition & 1 deletion packages/helux-core/src/consts/user.ts
Original file line number Diff line number Diff line change
@@ -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;

Expand Down
4 changes: 2 additions & 2 deletions packages/helux-core/src/types/api.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
|------------------------------------------------------------------------------------------------
| [email protected].0
| [email protected].1
| A state library core that integrates atom, signal, collection dep, derive and watch,
| it supports all react like frameworks ( including react 18 ).
|------------------------------------------------------------------------------------------------
Expand Down Expand Up @@ -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: {
/** 共享状态创建时的事件 */
Expand Down
7 changes: 4 additions & 3 deletions packages/helux-utils/src/log.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 75103a9

Please sign in to comment.