impresso/impresso-middle-layer

text-reuse-passages:find throws a TypeError when ordering by clusterSize

Opened this issue · 1 comments

ERROR N/A TypeError at text-reuse-passages:find:  TypeError: Cannot read properties of undefined (reading 'id')
    at /impresso-middle-layer/dist/services/text-reuse-passages/text-reuse-passages.class.js:50:81
    at Array.map (<anonymous>)
    at /impresso-middle-layer/dist/services/text-reuse-passages/text-reuse-passages.class.js:47:37
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async TextReusePassages.<anonymous> (/impresso-middle-layer/dist/hooks/rateLimiter.js:91:9)
    at async TextReusePassages.<anonymous> (/impresso-middle-layer/dist/hooks/authenticate.js:32:5)

Thank you! @danieleguido
Just in case, this is also the case for all other orderings, except by date.