From fa85c0752a0f3f170f3d21099bef3524e2b618ee Mon Sep 17 00:00:00 2001 From: Florian Hotze Date: Fri, 26 Jul 2024 14:16:53 +0200 Subject: [PATCH] Link add: Fix create item fails for trigger channels (#2689) Regression from #2312. Fixes #2669. Signed-off-by: Florian Hotze --- .../web/src/pages/settings/things/link/link-add.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bundles/org.openhab.ui/web/src/pages/settings/things/link/link-add.vue b/bundles/org.openhab.ui/web/src/pages/settings/things/link/link-add.vue index 1ffa56de1d..34468c9f0c 100644 --- a/bundles/org.openhab.ui/web/src/pages/settings/things/link/link-add.vue +++ b/bundles/org.openhab.ui/web/src/pages/settings/things/link/link-add.vue @@ -186,7 +186,7 @@ export default { } }, methods: { - onPageAfterIn (event) { + onPageAfterIn () { if (!this.channel) return this.loadProfileTypes(this.channel) let newItemName = this.$oh.utils.normalizeLabel(this.thing.label) @@ -204,7 +204,7 @@ export default { }) }, linkUnit () { - const dimension = this.channel.itemType.startsWith('Number:') ? this.channel.itemType.split(':')[1] : '' + const dimension = (this.channel && this.channel.itemType && this.channel.itemType.startsWith('Number:')) ? this.channel.itemType.split(':')[1] : '' return dimension ? this.getUnitHint(dimension, this.channelType) : '' }, stateDescription () {