@@ -199,7 +199,7 @@ export function deriveItemData({
199
199
return {
200
200
...item ,
201
201
authors : itemEnrichment ?. authors || item ?. authors || false ,
202
- title : title ( { item, itemEnrichment } ) ,
202
+ title : title ( { item, itemEnrichment, node } ) ,
203
203
thumbnail : thumbnail ( { item, itemEnrichment } ) ,
204
204
excerpt : excerpt ( { item, itemEnrichment } ) ,
205
205
publisher : publisher ( { item, itemEnrichment, passedPublisher } ) ,
@@ -229,12 +229,13 @@ export function deriveItemData({
229
229
* @param {object } curatedInfo Additional information provided by the curation team
230
230
* @returns {string } The most appropriate title to show
231
231
*/
232
- function title ( { item, itemEnrichment } ) {
232
+ function title ( { item, itemEnrichment, node } ) {
233
233
// This is for matching images/files
234
234
const urlToUse = item ?. collectionUrl || item ?. givenUrl || item ?. resolvedUrl
235
235
const file = urlToUse ?. substring ( urlToUse . lastIndexOf ( '/' ) + 1 )
236
236
const fileName = file ? file . replace ( / \. [ ^ / . ] + $ / , '' ) : false
237
237
return (
238
+ node ?. title ||
238
239
itemEnrichment ?. title ||
239
240
item ?. collection ?. title ||
240
241
item ?. title ||
0 commit comments