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

[Applab/Gamelab] Check if callback is a function before calling #35862

Merged
merged 1 commit into from Jul 20, 2020

Conversation

ajpal
Copy link
Contributor

@ajpal ajpal commented Jul 17, 2020

For applab/gamelab functions that take callbacks, we were checking to see whether the callback was provided, but not checking to make sure the callback was a function. This was resulting in New Relic error e.callback.call is not a function.

Before
image
There is a warning in the debug console, but we still try to call the callback
image

After
image

Links

Testing story

Reviewer Checklist:

  • Tests provide adequate coverage
  • Code is well-commented
  • New features are translatable or updates will not break translations
  • Relevant documentation has been added or updated
  • User impact is well-understood and desirable
  • Pull Request is labeled appropriately
  • Follow-up work items (including potential tech debt) are tracked and linked

@ajpal ajpal requested a review from a team July 17, 2020 16:40
Copy link
Contributor

@maddiedierker maddiedierker left a comment

Choose a reason for hiding this comment

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

📞 ☎️

@ajpal ajpal merged commit 7379c6b into staging Jul 20, 2020
@ajpal ajpal deleted the jul17-callback.call branch July 20, 2020 16:13
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.

None yet

2 participants