check for null parent elements in mdInkRipple #313 (#317)

* fix standalone build #312

* [build] 0.6.3

* [release] 0.6.3

* fixes #313 check for null
This commit is contained in:
Kory Prince 2017-01-10 20:04:50 -06:00 committed by Marcos Moura
parent 46e916657a
commit 69242c5b9a

View file

@ -61,9 +61,12 @@
return availablePositions.indexOf(getComputedStyle(element).position) > -1;
},
getClosestPositionedParent(element) {
if (!element) {
return false;
}
const parent = element.parentNode;
if (!element || !parent || parent.tagName.toLowerCase() === 'body') {
if (!parent || parent.tagName.toLowerCase() === 'body') {
return false;
}
@ -71,7 +74,7 @@
return element;
}
return this.getClosestPositionedParent(element.parentNode);
return this.getClosestPositionedParent(parent);
},
getParentSize() {
const parent = this.parentElement;