diff options
| author | Johann150 <johann.galle@protonmail.com> | 2022-07-04 16:39:04 +0200 |
|---|---|---|
| committer | Johann150 <johann.galle@protonmail.com> | 2022-07-04 16:39:04 +0200 |
| commit | d748ba2c51211d3a2833fd1cb6ef898bc149d486 (patch) | |
| tree | c36fae05f983c74b7156317190ccab821d074f7d /packages/client/src/widgets | |
| parent | fix lint no-undef (diff) | |
| download | sharkey-d748ba2c51211d3a2833fd1cb6ef898bc149d486.tar.gz sharkey-d748ba2c51211d3a2833fd1cb6ef898bc149d486.tar.bz2 sharkey-d748ba2c51211d3a2833fd1cb6ef898bc149d486.zip | |
fix lint no-prototype-builtins
Diffstat (limited to 'packages/client/src/widgets')
| -rw-r--r-- | packages/client/src/widgets/widget.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/packages/client/src/widgets/widget.ts b/packages/client/src/widgets/widget.ts index 9626d01619..9fdfe7f3e1 100644 --- a/packages/client/src/widgets/widget.ts +++ b/packages/client/src/widgets/widget.ts @@ -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, () => { |