Skip to content

(#8491) - Fix $regex and $ne within $or operator#8493

Merged
garethbowen merged 4 commits intoapache:masterfrom
filionf:ff/fix-regex-within-or
Aug 22, 2022
Merged

(#8491) - Fix $regex and $ne within $or operator#8493
garethbowen merged 4 commits intoapache:masterfrom
filionf:ff/fix-regex-within-or

Conversation

@filionf
Copy link
Contributor

@filionf filionf commented Apr 25, 2022

No description provided.

@garethbowen
Copy link
Contributor

Original issue: #8491

Copy link
Contributor

@garethbowen garethbowen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Just one small readability change and I'll sign off on it. Thanks!

Comment on lines 324 to 326
var fields = Object.keys(selector);
for (var i = 0; i < fields.length; i++) {
var field = fields[i];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It'd be better to use a forEach loop here...

Suggested change
var fields = Object.keys(selector);
for (var i = 0; i < fields.length; i++) {
var field = fields[i];
Object.keys(selector).forEach(function (field) {
...
});

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed! The forEach is more of my style, I must have been trying to replicate code style from above.

Copy link
Contributor

@garethbowen garethbowen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@garethbowen garethbowen merged commit 3fe71b0 into apache:master Aug 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants