Pb with getLastOpenFiles()

Hello all seeking for help,

The following request
$=dv.list(app.workspace.getLastOpenFiles().map(function(x){return(dv.page(x).file)}))

generate the following error

Dataview (for inline JS query ‘dv.list(app.workspace.getLastOpenFiles().map(function(x){return(dv.page(x).file)}))’): TypeError: Cannot read properties of undefined (reading ‘file’)

The request has worked once, but do not work anymore …

For info the following request is working well

$=dv.page(app.workspace.getLastOpenFiles()[0]).file

resulting in

path: 001-Home/lastViewed.md, folder: 001-Home, name: lastViewed, link: lastViewed, outlinks: , inlinks: home, etags: , tags: , aliases: , lists: , tasks: , ctime: 5:25 PM - avril 09, 2024, cday: avril 09, 2024, mtime: 6:53 PM - avril 09, 2024, mday: avril 09, 2024, size: 541, starred: false, frontmatter: , ext: md