Skip to content
This repository has been archived by the owner on Mar 13, 2018. It is now read-only.

Commit

Permalink
Fixed bug where a blank card is displayed
Browse files Browse the repository at this point in the history
on-tap is attached to both the chip-container and the card.
To know which card gets displayed, the transition function called
by on-tap assigns the selectedAlbum variable the value of the target's
templateInstance.model.item, which is null if the user clicks on any
area which is inside chip-container but outside a chip. This results
to a blank card being displayed.

The simplest fix for this is to check if selectedAlbum is null before
setting the page flag to 1.
  • Loading branch information
franzks committed Jul 16, 2014
1 parent 247e372 commit a87d664
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion demos/music.html
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,9 @@
transition: function(e) {
if (this.page === 0) {
this.selectedAlbum = e.target.templateInstance.model.item;
this.page = 1;
if(this.selectedAlbum != null) {
this.page = 1;
}
} else {
this.page = 0;
}
Expand Down

0 comments on commit a87d664

Please sign in to comment.