Skip to content

Commit

Permalink
feat: 小程序update增加catch (#309)
Browse files Browse the repository at this point in the history
Co-authored-by: xuying.xu <[email protected]>
  • Loading branch information
tangying1027 and xuying.xu authored Oct 16, 2024
1 parent 44ac39f commit c700298
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/f-my/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,13 @@ Component({
if (!canvas) return;
const { theme, px2hd } = props;
const children = props.onRender(props);
canvas.update({
const updateProps = {
theme,
px2hd,
children,
};
canvas.update(updateProps).catch((error) => {
this.catchError(error);
});
},
didUnmount() {
Expand Down

0 comments on commit c700298

Please sign in to comment.