Fixed: If usesUsed was undefined, usesLeft of an action was NaN
This commit is contained in:
@@ -146,7 +146,7 @@ export default {
|
|||||||
return Math.max(this.model.usesResult, 0);
|
return Math.max(this.model.usesResult, 0);
|
||||||
},
|
},
|
||||||
usesLeft(){
|
usesLeft(){
|
||||||
return Math.max(this.model.usesResult - this.model.usesUsed, 0);
|
return Math.max(this.model.usesResult - (this.model.usesUsed || 0), 0);
|
||||||
},
|
},
|
||||||
propertyName(){
|
propertyName(){
|
||||||
return getPropertyName(this.model.type);
|
return getPropertyName(this.model.type);
|
||||||
|
|||||||
@@ -168,7 +168,7 @@ export default {
|
|||||||
return Math.max(this.model.usesResult, 0);
|
return Math.max(this.model.usesResult, 0);
|
||||||
},
|
},
|
||||||
usesLeft(){
|
usesLeft(){
|
||||||
return Math.max(this.model.usesResult - this.model.usesUsed, 0);
|
return Math.max(this.model.usesResult - (this.model.usesUsed || 0), 0);
|
||||||
},
|
},
|
||||||
actionTypeIcon() {
|
actionTypeIcon() {
|
||||||
return `$vuetify.icons.${this.model.actionType}`;
|
return `$vuetify.icons.${this.model.actionType}`;
|
||||||
|
|||||||
Reference in New Issue
Block a user