summaryrefslogtreecommitdiff
path: root/packages/client/src/widgets
diff options
context:
space:
mode:
authorJohann150 <johann.galle@protonmail.com>2022-07-04 16:39:04 +0200
committerJohann150 <johann.galle@protonmail.com>2022-07-04 16:39:04 +0200
commitd748ba2c51211d3a2833fd1cb6ef898bc149d486 (patch)
treec36fae05f983c74b7156317190ccab821d074f7d /packages/client/src/widgets
parentfix lint no-undef (diff)
downloadsharkey-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.ts5
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, () => {