Skip to content

Commit

Permalink
Link add: Fix create item fails for trigger channels (openhab#2689)
Browse files Browse the repository at this point in the history
Regression from openhab#2312.
Fixes openhab#2669.

Signed-off-by: Florian Hotze <[email protected]>
  • Loading branch information
florian-h05 authored Jul 26, 2024
1 parent 2de240e commit fa85c07
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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 () {
Expand Down

0 comments on commit fa85c07

Please sign in to comment.