Skip to content

Commit c75da96

Browse files
committed
Use steam api response even if steamdb fails
1 parent 09e82c4 commit c75da96

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

scripts/store/app.js

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -751,13 +751,22 @@ function DrawOnlineStatsWidget( items )
751751
WriteLog( 'GetApp failed to load' );
752752
}
753753

754-
block?.remove();
755-
756754
for( const el of updateElements )
757755
{
758756
el.remove();
759757
}
760758

759+
steamApiPlayersFetch.then( ( livePlayers ) =>
760+
{
761+
if( livePlayers < 1 )
762+
{
763+
block?.remove();
764+
return;
765+
}
766+
767+
onlineNow.textContent = FormatNumber( livePlayers );
768+
} );
769+
761770
return;
762771
}
763772

0 commit comments

Comments
 (0)