Skip to content
This repository has been archived by the owner on Dec 19, 2017. It is now read-only.

Fix for core-dropdown "Cannot read property 'position' of null" #180

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 10 additions & 7 deletions lib/src/core-dropdown/core-dropdown.html
Original file line number Diff line number Diff line change
Expand Up @@ -183,13 +183,16 @@
resetTargetDimensions: function() {
var dims = this.dimensions;
var style = this.target.style;
if (dims.position.h_by === this.localName) {
style[dims.position.h] = null;
dims.position.h_by = null;
}
if (dims.position.v_by === this.localName) {
style[dims.position.v] = null;
dims.position.v_by = null;
// Dims may be not define
if(dims) {
if (dims.position.h_by === this.localName) {
style[dims.position.h] = null;
dims.position.h_by = null;
}
if (dims.position.v_by === this.localName) {
style[dims.position.v] = null;
dims.position.v_by = null;
}
}
this.super();
},
Expand Down