File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
src/components/prestaking Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -114,10 +114,12 @@ export default defineComponent({
114114 return ' label' in validator ;
115115 }
116116
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 );
121123 })
122124 .sort ((a , b ) => {
123125 const cmp = (a .stake ? a .stake : 0 ) - (b .stake ? b .stake : 0 );
You can’t perform that action at this time.
0 commit comments