Commit 271731d 1 parent 765106f commit 271731d Copy full SHA for 271731d
File tree 1 file changed +6
-4
lines changed
src/components/prestaking
1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -114,10 +114,12 @@ export default defineComponent({
114
114
return ' label' in validator ;
115
115
}
116
116
117
- return [
118
- (' label' in validator ? validator .label : ' ' ).toLowerCase (),
119
- validator .address .toLowerCase (),
120
- ].join (' ' ).includes (searchValue .value .toLowerCase ());
117
+ const searchTerm = searchValue .value .toLowerCase ().replace (/ \s + / g , ' ' );
118
+ const validatorLabel = (' label' in validator ? validator .label : ' ' )
119
+ .toLowerCase ().replace (/ \s + / g , ' ' );
120
+ const validatorAddress = validator .address .toLowerCase ().replace (/ \s + / g , ' ' );
121
+
122
+ return validatorLabel .includes (searchTerm ) || validatorAddress .includes (searchTerm );
121
123
})
122
124
.sort ((a , b ) => {
123
125
const cmp = (a .stake ? a .stake : 0 ) - (b .stake ? b .stake : 0 );
You can’t perform that action at this time.
0 commit comments