1
0
Fork 0

Sorting by level works as expected

This commit is contained in:
sharpshark28 2017-08-17 22:37:18 -05:00
parent a30d0db4e4
commit 5c73ec1c9d
2 changed files with 2 additions and 5 deletions

View file

@ -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,
}
})

View file

@ -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)
},