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-AlexandruandStefan Silviu authored and GitHub committed 2020-09-30 20:01:07 +02:00
1 parent bea31d5fec
commit 91364db882
1 file changed
+1 -1
@@ -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;
}