diff --git a/components/lib/basecomponent/BaseComponent.vue b/components/lib/basecomponent/BaseComponent.vue index d25a6d969..d8cf2e3b1 100644 --- a/components/lib/basecomponent/BaseComponent.vue +++ b/components/lib/basecomponent/BaseComponent.vue @@ -323,7 +323,11 @@ export default { // $attrs without `pt:*` return Object.entries(this.$attrs || {}) .filter(([key]) => !key?.startsWith('pt:')) - .reduce((acc, [key, value]) => (acc[key] = value) && acc, {}); + .reduce((acc, [key, value]) => { + acc[key] = value; + + return acc; + }, {}); } } }; diff --git a/components/lib/inputswitch/InputSwitch.vue b/components/lib/inputswitch/InputSwitch.vue index 8d3d8c5f3..0045a4fc3 100755 --- a/components/lib/inputswitch/InputSwitch.vue +++ b/components/lib/inputswitch/InputSwitch.vue @@ -32,7 +32,7 @@ export default { emits: ['update:modelValue', 'change', 'focus', 'blur'], methods: { getPTOptions(key) { - const _ptm = root === 'root' ? this.ptmi : this.ptm; + const _ptm = key === 'root' ? this.ptmi : this.ptm; return _ptm(key, { context: {