fix: use SeriesMetadata method instead of property in findMostRecentStructuredReport (#2038)

fixes #1714

Call getInstanceCount() instead of manually checking length (which does not work)

Co-authored-by: Stefan Silviu <silviu.stefan@ab4.systems>
This commit is contained in:
Ștefan Silviu-Alexandru 2020-09-30 21:01:07 +03:00 committed by GitHub
parent bea31d5fec
commit 91364db882
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -13,7 +13,7 @@ const findMostRecentStructuredReport = studies => {
// Skip series that may not have instances yet
// This can happen if we have retrieved just the initial
// details about the series via QIDO-RS, but not the full metadata
if (!series.instances || !series.instances.length) {
if (!series || series.getInstanceCount() === 0) {
return;
}