Skip to content

Commit

Permalink
fix: format
Browse files Browse the repository at this point in the history
  • Loading branch information
ZWkang committed Aug 1, 2023
1 parent c9b2e4e commit f6e1837
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/utils/commonUtil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export function hasValue(value) {
}

export function isComboNoValue(value) {
if(value === 0) return false;
if (value === 0) return false;
return !value;
}

Expand Down
8 changes: 3 additions & 5 deletions tests/Combobox.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -603,9 +603,7 @@ describe('Select.Combobox', () => {

// https://github.com/ant-design/ant-design/issues/43936
it('combobox mode not show 0 value', () => {
const wrapper = mount(
<Select mode="combobox" value={0} />
);
expect(wrapper.find('input').props().value).toBe("0");
})
const wrapper = mount(<Select mode="combobox" value={0} />);
expect(wrapper.find('input').props().value).toBe('0');
});
});

0 comments on commit f6e1837

Please sign in to comment.