Index: chrome/browser/resources/file_manager/audio_player/elements/track_list.js |
diff --git a/chrome/browser/resources/file_manager/audio_player/elements/track_list.js b/chrome/browser/resources/file_manager/audio_player/elements/track_list.js |
index f022870aa4d750ccf17895a72e1019893fed9803..0f37b2512f86797ad329302e429f73851c696ca1 100644 |
--- a/chrome/browser/resources/file_manager/audio_player/elements/track_list.js |
+++ b/chrome/browser/resources/file_manager/audio_player/elements/track_list.js |
@@ -101,17 +101,18 @@ |
* @param {Event} event Click event. |
*/ |
tracksChanged: function(oldValue, newValue) { |
- if (oldValue !== newValue) { |
- // Re-register the observer of 'this.tracks'. |
- this.tracksObserver_.close(); |
- this.tracksObserver_ = new ArrayObserver( |
- this.tracks, |
- this.tracksValueChanged_.bind(this)); |
- |
- // Reset play order and current index. |
- if (this.tracks.length !== 0) |
- this.generatePlayOrder(false /* no need to keep the current track */); |
- } |
+ // Note: Sometimes both oldValue and newValue are null though the actual |
+ // values are not null. Maybe it's a bug of Polymer. |
+ |
+ // Re-register the observer of 'this.tracks'. |
+ this.tracksObserver_.close(); |
+ this.tracksObserver_ = new ArrayObserver( |
+ this.tracks, |
+ this.tracksValueChanged_.bind(this)); |
+ |
+ // Reset play order and current index. |
+ if (this.tracks.length !== 0) |
+ this.generatePlayOrder(false /* no need to keep the current track */); |
if (this.tracks.length === 0) { |
this.playOrder = []; |