You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In GitLab by @adrien.schiehle on Mar 14, 2021, 11:50
Hi, I'm new here, so first :
Thank you for this integration module !
It will allow me to create my article in advance and share what I want directly inside fvtt.
When I tried it, some of my articles couldn't be imported. Here was the stack :
framework.js:71Uncaught(inpromise) TypeError: Cannotreadproperty'id'ofundefinedatframework.js:71atArray.map(<anonymous>)
at _getArticleContent (framework.js:71)
at importArticle (framework.js:12)
at async WorldAnvilBrowser._onClickControlButton (journal.js:146)
If I understand correctly, timeline relations inside an article are not correctly interpreted. section.items is undefined.
// Article relationsif(article.relations){for(let[id,section]ofObject.entries(article.relations)){consttitle=section.title||id.titleCase();constitems=section.itemsinstanceofArray ? section.items: [section.items];// Items can be one or manyconstrelations=items.map(i=>`<span data-article-id="${i.id}" data-template="${i.type}">${i.title}</span>`);aside+=`<dt>${title}:</dt><dd>${relations.join(", ")}</dd>`}}
Something like this could do the job. What do you think ?
letitems=section.items;if(!items){items=[];// There can be no items in an article relation. (Ex: timeline)}elseif(!itemsinstanceofArray){items=[section.items];// Items can be one or many}
The text was updated successfully, but these errors were encountered:
In GitLab by @adrien.schiehle on Mar 14, 2021, 11:50
Hi, I'm new here, so first :
It will allow me to create my article in advance and share what I want directly inside fvtt.
When I tried it, some of my articles couldn't be imported. Here was the stack :
If I understand correctly, timeline relations inside an article are not correctly interpreted.
section.items
is undefined.Something like this could do the job. What do you think ?
The text was updated successfully, but these errors were encountered: