mirror of
https://github.com/Hopiu/vue-material.git
synced 2026-04-09 01:11:06 +00:00
* fix standalone build #312 * [build] 0.6.3 * [release] 0.6.3 * fixes #313 check for null
This commit is contained in:
parent
46e916657a
commit
69242c5b9a
1 changed files with 5 additions and 2 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue