Sorting by level works as expected
This commit is contained in:
parent
a30d0db4e4
commit
5c73ec1c9d
2 changed files with 2 additions and 5 deletions
|
@ -28,7 +28,7 @@ let indexedSpells = spellsWithIDs.map(spell => {
|
|||
id: spell.id,
|
||||
name: spell.name,
|
||||
classes: spell.classes,
|
||||
level: spell.level,
|
||||
level: spell.level.toLowerCase() === 'cantrip' ? 0 : parseInt(spell.level),
|
||||
link: '/spell/' + spell.id,
|
||||
}
|
||||
})
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<div v-bind:class="{'checked': checked}">
|
||||
<div class="item-primary">
|
||||
{{level}}
|
||||
{{spell.level}}
|
||||
</div>
|
||||
<div class="item-content has-secondary">
|
||||
<router-link :to="spell.link">
|
||||
|
@ -35,9 +35,6 @@ import { capitalize } from '../utils'
|
|||
|
||||
export default {
|
||||
computed: {
|
||||
level () {
|
||||
return this.spell.level.toLowerCase() === 'cantrip' ? '0' : this.spell.level.charAt(0)
|
||||
},
|
||||
school () {
|
||||
return capitalize(this.spell.school)
|
||||
},
|
||||
|
|
Loading…
Add table
Reference in a new issue