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: my expenses complete method typeerror #3173

Merged
merged 3 commits into from
Aug 16, 2024

Conversation

Madhusudan092001
Copy link
Contributor

Clickup

app.clickup.com

Code Coverage

TypeError
i.complete is not a function. (In 'i.complete()', 'i.complete' is undefined)

Solved using optional chaining on the complete method too

The error i.complete() is not a function occurs when the complete method is either undefined or not a function on the target object. I confirmed through console logs that event.target is a valid ion-infinite-scroll element, and the complete method exists as a function. However, if the method doesn't exist for a specific user, it might be missing or incorrectly bound to the target element. As a fallback, I implemented a check using the optional chaining to ensure that if event.target or complete isn't a function, the complete method won't be called, preventing the error.

UI Preview

Please add screenshots for UI changes

Copy link

Unit Test Coverage % values
Statements 95.85% ( 19037 / 19861 )
Branches 91.15% ( 10416 / 11427 )
Functions 94.22% ( 5696 / 6045 )
Lines 95.88% ( 18169 / 18949 )

@Madhusudan092001 Madhusudan092001 merged commit a195076 into master Aug 16, 2024
6 checks passed
Copy link

sentry-io bot commented Aug 21, 2024

Suspect Issues

This pull request was deployed and Sentry observed the following issues:

  • ‼️ TypeError: i.complete is not a function. (In 'i.complete()', 'i.complete' is undefined) apply(src/app/fyle/my-expenses/my-expenses.page) View Issue

Did you find this useful? React with a 👍 or 👎

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/XS Extra Small PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants