We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fef42fd commit 87db9bdCopy full SHA for 87db9bd
components/vc-checkbox/Checkbox.tsx
@@ -113,9 +113,10 @@ export default defineComponent({
113
onKeypress,
114
onKeyup,
115
} = attrs as HTMLAttributes;
116
- const globalProps = Object.keys({ ...others, ...attrs }).reduce((prev, key) => {
+ const othersAndAttrs = { ...others, ...attrs };
117
+ const globalProps = Object.keys(othersAndAttrs).reduce((prev, key) => {
118
if (key.substr(0, 5) === 'aria-' || key.substr(0, 5) === 'data-' || key === 'role') {
- prev[key] = others[key];
119
+ prev[key] = othersAndAttrs[key];
120
}
121
return prev;
122
}, {});
0 commit comments