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(ripple): ensure _ripple data is not undefined #6476

Merged

Conversation

floryst
Copy link
Contributor

@floryst floryst commented Feb 12, 2019

Description

Instead of assuming element._ripple won't be undefined/null (which it could be), verify that this is the case.

Motivation and Context

Deleting a v-btn on click results in a console error "Cannot set property 'touched' of undefined at ripple.ts:148". This occurs when the ripple directive's unbind() function is called before rippleHide()'s setTimeout finishes.

Steps to reproduce (codepen):

  1. Open browser devtools console
  2. Click on the "delete me" button in the test page
  3. Observe the error message in the console

How Has This Been Tested?

visually (added the undefined guard manually to a vuetify build)

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Improvement/refactoring (non-breaking change that doesn't add any feature but make things better)

Checklist:

  • The PR title is no longer than 64 characters.
  • The PR is submitted to the correct branch (master for bug fixes and documentation updates, dev for new features and breaking changes).
  • My code follows the code style of this project.
  • I've added relevant changes to the documentation (applies to new features and breaking changes in core library)

@codecov
Copy link

codecov bot commented Feb 12, 2019

Codecov Report

Merging #6476 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #6476      +/-   ##
=========================================
+ Coverage    85.6%   85.6%   +<.01%     
=========================================
  Files         298     298              
  Lines        7160    7162       +2     
  Branches     1781    1782       +1     
=========================================
+ Hits         6129    6131       +2     
  Misses        941     941              
  Partials       90      90
Impacted Files Coverage Δ
packages/vuetify/src/directives/ripple.ts 75.59% <100%> (+0.39%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 592e3f4...9c80b70. Read the comment docs.

@tobiasdalhof
Copy link

tobiasdalhof commented Feb 12, 2019

This PR will probably fix #6477

Copy link
Member

@MajesticPotatoe MajesticPotatoe left a comment

Choose a reason for hiding this comment

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

Thank you for your contribution and interest in improving Vuetify! Make sure to join us in the Discord community.

@MajesticPotatoe MajesticPotatoe merged commit 0cd5671 into vuetifyjs:master Feb 12, 2019
@floryst floryst deleted the fix-ripple-hide-after-unbind branch February 13, 2019 17:57
@lock
Copy link

lock bot commented Apr 14, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. Please direct any non-bug questions to our Discord

@lock lock bot locked as resolved and limited conversation to collaborators Apr 14, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants