File tree Expand file tree Collapse file tree 3 files changed +14
-9
lines changed
Expand file tree Collapse file tree 3 files changed +14
-9
lines changed Original file line number Diff line number Diff line change 11<template >
22 <div class =" content" >
3- <template v-if =" groups . length !== 0 " >
3+ <template v-if =" groups " >
44 <section
5- v-if =" Object.keys( info).length !== 0 "
5+ v-if =" info"
66 id =" intro"
77 class =" method first-of-group" >
88 <div class =" method__area" >
Original file line number Diff line number Diff line change 11<template >
22 <div class =" sidebar" >
3- <scroll-spy class =" sidebar__navigation" >
4- <template v-if =" Object .keys (info ).length !== 0 " >
3+ <scroll-spy
4+ v-if =" dataReady"
5+ class =" sidebar__navigation" >
6+ <template v-if =" info " >
57 <h5 class =" sidebar__navigation__heading" >Topics</h5 >
68 <ul class =" sidebar__navigation__items" >
79 <li >
1113 </li >
1214 </ul >
1315 </template >
14- <template v-if = " groups . length !== 0 " >
16+ <template >
1517 <h5 class =" sidebar__navigation__heading" >API</h5 >
1618 <ul class =" sidebar__navigation__items" >
1719 <li
@@ -44,7 +46,10 @@ export default {
4446 ... mapGetters ({
4547 info: ' hapi-docs/info' ,
4648 groups: ' hapi-docs/groupedPaths'
47- })
49+ }),
50+ dataReady () {
51+ return this .groups && this .info
52+ }
4853 }
4954}
5055 </script >
Original file line number Diff line number Diff line change @@ -3,10 +3,10 @@ import * as types from '../mutation-types'
33
44export const state = {
55 host : '' ,
6- scheme : [ ] ,
7- info : { } ,
6+ scheme : '' ,
7+ info : null ,
88 paths : [ ] ,
9- groups : [ ] ,
9+ groups : null ,
1010 tags : [ ]
1111}
1212
You can’t perform that action at this time.
0 commit comments