fix: hanging protocol for the tmtv (#2882)

This commit is contained in:
Alireza authored and GitHub committed 2022-08-19 19:35:29 -04:00
1 parent df6ddf1572
commit 2639d90e5e
4 files changed
+14 -19

No files matched your search

@@ -116,12 +116,15 @@ export default class ProtocolEngine {
}
});
// If no matches were found, select the default protocol
// If no matches were found, select the default protocol if provided
// if not select the first protocol in the list
if (!matched.length) {
return [
{
score: 1,
protocol: this.protocols.find(protocol => protocol.id === 'default'),
protocol:
this.protocols.find(protocol => protocol.id === 'default') ??
this.protocols[0],
},
];
}