Skip to content

Commit 9ece35e

Browse files
committed
changes to render group based on advanced query - part 3
1 parent 42bf3f0 commit 9ece35e

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

UI/web-app/src/components/HRQuerySource/HRQuerySource.base.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -379,8 +379,7 @@ function parseSegment(segment: string, groupOperator?: string): Group {
379379
let remainingSegment = segment.substring(0, start) + segment.substring(end + 1);
380380
var match = remainingSegment.match(/\b(Or|And)\b/i);
381381
var operator = match ? match[1] : null;
382-
remainingSegment = remainingSegment.replace(/\s*(Or|And)\s*/gi, '').trim();
383-
382+
remainingSegment = remainingSegment.replace(/^\s*(Or|And)|\s*(Or|And)\s*$/gi, '').trim();
384383
if (remainingSegment) {
385384
return {
386385
name: '',

0 commit comments

Comments
 (0)