correction pb d'accès aux pages statiques

This commit is contained in:
Valentin 2024-10-11 14:46:46 +02:00
parent 48672f9b4c
commit 7faba809bd
1 changed files with 1 additions and 2 deletions

View File

@ -217,10 +217,9 @@ export const useContentStore = defineStore('content', {
this.map = map; this.map = map;
try { try {
const response = await REST.get(`/jsonapi/node/static/`); const response = await REST.get(`/jsonapi/node/static/`);
console.log(response.data.data);
for (let page of response.data.data) { for (let page of response.data.data) {
if (page.attributes.drupal_internal__nid == nid) { if (page.attributes?.drupal_internal__nid == nid) {
for (let metatag of page.attributes.metatag) { for (let metatag of page.attributes.metatag) {
if (metatag.tag === "link") { if (metatag.tag === "link") {
this.href = metatag.attributes.href; this.href = metatag.attributes.href;