|
@@ -7,7 +7,7 @@
|
|
|
|
|
|
<div class="buttons">
|
|
|
<template v-if="!immutable">
|
|
|
- <div v-if="position.label" class="label-text">{{ currentLabel !== undefined ? currentLabel.name : '' }}</div>
|
|
|
+ <div v-if="position.label" class="label-text">{{ currentLabel ? currentLabel.name : 'unknown label' }}</div>
|
|
|
|
|
|
<img v-if="confirmationButton"
|
|
|
alt="confirm" src="@/assets/icons/check.svg"
|
|
@@ -80,7 +80,10 @@ export default {
|
|
|
return Object.keys(this.labels).map(key => this.labels[key]);
|
|
|
},
|
|
|
currentLabel: function () {
|
|
|
- return this.labels[this.position.label];
|
|
|
+ if (this.position.label in this.labels)
|
|
|
+ return this.labels[this.position.label];
|
|
|
+ else
|
|
|
+ return false;
|
|
|
},
|
|
|
style: function () {
|
|
|
const left = this.image.left;
|