Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Always use !== -1 to check for a string's existence #1372

Merged
merged 1 commit into from
May 25, 2020
Merged

Always use !== -1 to check for a string's existence #1372

merged 1 commit into from
May 25, 2020

Conversation

XhmikosR
Copy link
Contributor

@XhmikosR XhmikosR commented May 25, 2020

String.indexOf() returns -1 if the string isn't found so this is consistent with the rest of the codebase.

Signed-off-by: XhmikosR [email protected]

By submitting this pull request, I confirm the following: {please fill any appropriate checkboxes, e.g: [X]}

{Please ensure that your pull request is for the 'devel' branch!}

  • I have read and understood the contributors guide, as well as this entire template.
  • I have made only one major change in my proposed changes.
  • I have commented my proposed changes within the code.
  • I have tested my proposed changes.
  • I am willing to help maintain this change if there are issues with it later.
  • I give this submission freely and claim no ownership.
  • It is compatible with the EUPL 1.2 license
  • I have squashed any insignificant commits. (git rebase)
  • I have Signed Off all commits. (git commit --signoff)

`String.indexOf()` returns -1 if the string isn't found so this is consistent with the rest of the codebase.

Signed-off-by: XhmikosR <[email protected]>
@DL6ER DL6ER merged commit c86515e into devel May 25, 2020
@DL6ER DL6ER deleted the indexOf branch May 25, 2020 18:42
@XhmikosR XhmikosR added this to the v5.1 milestone May 29, 2020
@PromoFaux PromoFaux mentioned this pull request Jul 5, 2020
@pralor-bot
Copy link

This pull request has been mentioned on Pi-hole Userspace. There might be relevant details there:

https://discourse.pi-hole.net/t/pi-hole-5-1-released/35577/1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants