File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -310,7 +310,7 @@ export default class SmartTransactionsController extends PollingControllerV1<
310
310
311
311
if ( isNewSmartTransaction ) {
312
312
// add smart transaction
313
- const cancelledNonceIndex = currentSmartTransactions . findIndex (
313
+ const cancelledNonceIndex = currentSmartTransactions ? .findIndex (
314
314
( stx : SmartTransaction ) =>
315
315
stx . txParams ?. nonce === smartTransaction . txParams ?. nonce &&
316
316
stx . status ?. startsWith ( 'cancelled' ) ,
@@ -322,9 +322,9 @@ export default class SmartTransactionsController extends PollingControllerV1<
322
322
cancelledNonceIndex > - 1
323
323
? currentSmartTransactions
324
324
. slice ( 0 , cancelledNonceIndex )
325
- . concat ( currentSmartTransactions . slice ( cancelledNonceIndex + 1 ) )
326
- . concat ( historifiedSmartTransaction )
327
- : currentSmartTransactions . concat ( historifiedSmartTransaction ) ;
325
+ ? .concat ( currentSmartTransactions . slice ( cancelledNonceIndex + 1 ) )
326
+ ? .concat ( historifiedSmartTransaction )
327
+ : currentSmartTransactions ? .concat ( historifiedSmartTransaction ) ;
328
328
this . update ( {
329
329
smartTransactionsState : {
330
330
...smartTransactionsState ,
You can’t perform that action at this time.
0 commit comments