Skip to content

Commit

Permalink
修改boolean format规则
Browse files Browse the repository at this point in the history
  • Loading branch information
zhipenglin committed Oct 22, 2024
1 parent 2212144 commit 063d386
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@kne/info-page",
"version": "0.1.8",
"version": "0.1.9",
"description": "一般用在复杂的详情展示页面,InfoPage提供了一个标准的展示信息的格式",
"syntax": {
"esmodules": true
Expand Down
2 changes: 1 addition & 1 deletion src/formatView.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export const defaultFormat = {
},
boolean: (value, { args }) => {
const trueValue = args[0] || 'true';
if (value.toString() === trueValue) {
if ((value || '').toString() === trueValue) {
return '是';
}
return '否';
Expand Down

0 comments on commit 063d386

Please sign in to comment.