Skip to content

Commit

Permalink
style(picker): update temp fix warning
Browse files Browse the repository at this point in the history
  • Loading branch information
adamdbradley committed May 18, 2016
1 parent 28cf16a commit ed8335d
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions ionic/components/picker/picker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -343,11 +343,12 @@ class PickerColumnCmp {
this.col.selectedIndex = Math.max(Math.abs(Math.round(y / this.optHeight)), 0);

let colElements = this.colEle.nativeElement.querySelectorAll('.picker-opt');
if (colElements.length != this.col.options.length) {
// TODO: it would be great to find the root of the problem
// and implement a good fix, but at least, this prevents an expection
console.error("colElements.length!=this.col.options.length");
if (colElements.length !== this.col.options.length) {
// TODO: temporary until [style.transform] is fixed within ng2
console.warn('colElements.length!=this.col.options.length');
return;
}

for (var i = 0; i < colElements.length; i++) {
var ele: HTMLElement = colElements[i];
var opt = <any>this.col.options[i];
Expand Down

0 comments on commit ed8335d

Please sign in to comment.