Fixed bugs when a spell list does not have limit on prepared spells
This commit is contained in:
@@ -40,7 +40,9 @@
|
|||||||
:class="{'error--text' : preparedError}"
|
:class="{'error--text' : preparedError}"
|
||||||
class="pb-0"
|
class="pb-0"
|
||||||
>
|
>
|
||||||
{{ numPrepared }}/{{ model.maxPreparedResult }} spells prepared
|
<div v-if="model.maxPrepared">
|
||||||
|
{{ numPrepared }}/{{ model.maxPreparedResult }} spells prepared
|
||||||
|
</div>
|
||||||
<v-switch
|
<v-switch
|
||||||
v-model="preparingSpells"
|
v-model="preparingSpells"
|
||||||
label="Change prepared spells"
|
label="Change prepared spells"
|
||||||
@@ -102,6 +104,7 @@ export default {
|
|||||||
}).length;
|
}).length;
|
||||||
},
|
},
|
||||||
preparedError(){
|
preparedError(){
|
||||||
|
if (!this.model.maxPrepared) return;
|
||||||
let numPrepared = this.numPrepared;
|
let numPrepared = this.numPrepared;
|
||||||
let maxPrepared = this.model.maxPreparedResult;
|
let maxPrepared = this.model.maxPreparedResult;
|
||||||
return numPrepared !== maxPrepared
|
return numPrepared !== maxPrepared
|
||||||
|
|||||||
Reference in New Issue
Block a user