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

fix: Fix potential edge case in cordova.js detection #284

Merged
merged 1 commit into from
Nov 1, 2024

Conversation

dpogue
Copy link
Member

@dpogue dpogue commented Nov 1, 2024

Because indexOf returns -1 in the case of no match, and a subtraction of string lengths can also potentially result in -1, we want to make sure the index is not -1 before we try to substring with it.

Because `indexOf` returns -1 in the case of no match, and a subtraction
of string lengths can also potentially result in -1, we want to make
sure the index is NOT -1 before we try to substring with it.
@codecov-commenter
Copy link

codecov-commenter commented Nov 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.65%. Comparing base (788b62a) to head (c5ba88e).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #284      +/-   ##
==========================================
+ Coverage   83.62%   83.65%   +0.03%     
==========================================
  Files          14       14              
  Lines         519      520       +1     
==========================================
+ Hits          434      435       +1     
  Misses         85       85              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@dpogue dpogue merged commit 08a210d into apache:master Nov 1, 2024
13 checks passed
@dpogue dpogue deleted the length-check branch November 1, 2024 04:18
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.

3 participants