Skip to content
This repository was archived by the owner on Dec 18, 2022. It is now read-only.

Commit 6ed199d

Browse files
committed
Fix dynamic menu
1 parent 45919bb commit 6ed199d

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

components/page/PageTitle.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export default {
3333
return `h${this.blok.h}`;
3434
},
3535
subtitleH() {
36-
return `h${this.blok.h + 1}`;
36+
return `h${Number(this.blok.h) + 1}`;
3737
}
3838
}
3939
};

helpers/common-page.helper.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export function loadPageContentFromApi(context, route, starts_with) {
4646

4747
export function loadMenuFromApi(context) {
4848
if (context.store.state.menu.items.length === 0) {
49-
context.app.$storyapi
49+
return context.app.$storyapi
5050
.get(`cdn/stories/`, {
5151
starts_with: context.localePath('menu'),
5252
version: 'published'

plugins/common-stores.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
import menuStore from '../store/menu';
1+
import * as menuStore from '../store/menu';
22

33
export function registerStore(name, store, storeModule) {
4-
const storeModule = {
4+
const module = {
55
namespaced: true,
66
...storeModule
77
};
88

9-
store.registerModule(name, storeModule, {
9+
store.registerModule(name, module, {
1010
preserveState: !!store.state[name]
1111
});
1212
}

0 commit comments

Comments
 (0)