Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

Commit

Permalink
fix(ripple): prevent null error while using ripple
Browse files Browse the repository at this point in the history
  • Loading branch information
ajoslin committed Nov 25, 2014
1 parent 9c56383 commit 6d81ded
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/services/ripple/ripple.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ function InkRippleService($window, $timeout) {

function updateElement(elem) {
var index = ripples.indexOf(elem),
state = states[index],
state = states[index] || {},
elemIsActive = ripples.length > 1 ? false : isActive,
elemIsHeld = ripples.length > 1 ? false : isHeld;
if (elemIsActive || state.animating || elemIsHeld) {
Expand Down Expand Up @@ -188,7 +188,7 @@ function InkRippleService($window, $timeout) {
css = getRippleCss(size, left, top),
elem = getRippleElement(css),
index = ripples.indexOf(elem),
state = states[index];
state = states[index] || {};

rippleSize = size;

Expand Down

0 comments on commit 6d81ded

Please sign in to comment.