fixed the default base page lang code bug
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
fragment SearchResultFields on SearchResult {
|
||||
id
|
||||
uuid
|
||||
bundle
|
||||
title
|
||||
short_description
|
||||
|
@@ -11,7 +11,7 @@
|
||||
<span>Loading ...</span>
|
||||
</div>
|
||||
<ul v-else>
|
||||
<li v-for="item in items" v-bind:key="item.uuid">
|
||||
<li v-for="item in items" v-bind:key="item.id">
|
||||
<Card v-if="item.bundle == 'materiau'" :item="item"/>
|
||||
<CardThematique v-if="item.bundle == 'thematique'" :item="item"/>
|
||||
</li>
|
||||
|
@@ -40,7 +40,11 @@ export default {
|
||||
state.uuids = []
|
||||
},
|
||||
setResults (state, items) {
|
||||
state.items = state.items.concat(items)
|
||||
// console.log('setResults, items', items);
|
||||
if(items){ // avoid bug like items = [null]
|
||||
state.items = state.items.concat(items)
|
||||
}
|
||||
// console.log('setResults, state.items', state.items);
|
||||
},
|
||||
resetItems (state) {
|
||||
state.items = []
|
||||
@@ -131,7 +135,7 @@ export default {
|
||||
${ searchresultGQL }
|
||||
`
|
||||
MGQ.post('', { query: print(ast) })
|
||||
.then(( resp ) => {
|
||||
.then(resp => {
|
||||
console.log('loadSearchResultsGQL resp', resp )
|
||||
dispatch("loadSearchResultsCallBack", { items: resp.data.data.searchresults})
|
||||
})
|
||||
|
Reference in New Issue
Block a user