File tree 1 file changed +2
-2
lines changed 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -143,7 +143,7 @@ const CoinRankingComponent = (props: Props) => {
143
143
} )
144
144
145
145
React . useEffect ( ( ) => {
146
- if ( lastSceneFiat !== coingeckoFiat ) {
146
+ if ( lastSceneFiat != null && lastSceneFiat != = coingeckoFiat ) {
147
147
// Clear cache if we changed the fiat while outside of this scene
148
148
debugLog ( LOG_COINRANK , 'Clearing coinRankingDatas cache' )
149
149
coinRanking . coinRankingDatas = [ ]
@@ -230,7 +230,7 @@ const CoinRankingComponent = (props: Props) => {
230
230
return ( ) => {
231
231
// Reset related query state when this effect is unmounted (coingeckoFiat
232
232
// changed), but the scene is still mounted:
233
- if ( mounted . current ) {
233
+ if ( coingeckoFiat !== lastSceneFiat ) {
234
234
debugLog ( LOG_COINRANK , `Clearing coinRankingDatas cache for new fiat: ${ coingeckoFiat } ` )
235
235
clearTimeout ( timeoutId )
236
236
loopAbort ( )
You can’t perform that action at this time.
0 commit comments