fix lint no-prototype-builtins

This commit is contained in:
Johann150
2022-07-04 16:39:04 +02:00
parent a5c3fcea6e
commit d748ba2c51
4 changed files with 6 additions and 5 deletions

View File

@@ -36,8 +36,9 @@ export const useWidgetPropsManager = <F extends Form & Record<string, { default:
const mergeProps = () => {
for (const prop of Object.keys(propsDef)) {
if (widgetProps.hasOwnProperty(prop)) continue;
widgetProps[prop] = propsDef[prop].default;
if (typeof widgetProps[prop] === 'undefined') {
widgetProps[prop] = propsDef[prop].default;
}
}
};
watch(widgetProps, () => {