Skip to content

Commit

Permalink
fix a timing issue with list items
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan Lasky committed Mar 16, 2016
1 parent ede20c6 commit c85a68d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/mm-list-item/mm-list-item.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,13 @@
},

_highlightChanged: function() {
if (this.highlight) {
if (this.highlight && this.highlight.length > 0) {
var s = this.innerText;
Polymer.dom(this).innerHTML = s.replace(new RegExp(this.highlight,"ig"),function(orig) {
return '<span class="mm-list-item highlight">'+orig+'</span>';
},'ig');
} else {
Polymer.dom(this).innerHTML = this.innerText; //strip any formatting
} else if (this.innerText.trim()){
Polymer.dom(this).innerHTML = this.innerText.trim(); //strip any formatting
}
},

Expand Down

0 comments on commit c85a68d

Please sign in to comment.