From 40f30b3f18dd776bce3f0e6c5f7f904153dc3abc Mon Sep 17 00:00:00 2001 From: Dennis Karpienski Date: Tue, 12 Apr 2016 17:27:29 +0200 Subject: [PATCH] fixed code style --- src/more-infos/more-info-media_player.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/more-infos/more-info-media_player.js b/src/more-infos/more-info-media_player.js index 1dbfebc64e..585bd37a29 100644 --- a/src/more-infos/more-info-media_player.js +++ b/src/more-infos/more-info-media_player.js @@ -108,7 +108,7 @@ export default new Polymer({ this.volumeSliderValue = newVal.attributes.volume_level * 100; this.isMuted = newVal.attributes.is_volume_muted; this.source = newVal.attributes.source; - this.sourceIndex = newVal.attributes.source_list === undefined ? 0 : newVal.attributes.source_list.indexOf(this.source); + this.sourceIndex = 0; this.supportsPause = (newVal.attributes.supported_media_commands & 1) !== 0; this.supportsVolumeSet = (newVal.attributes.supported_media_commands & 4) !== 0; this.supportsVolumeMute = (newVal.attributes.supported_media_commands & 8) !== 0; @@ -118,6 +118,10 @@ export default new Polymer({ this.supportsTurnOff = (newVal.attributes.supported_media_commands & 256) !== 0; this.supportsVolumeButtons = (newVal.attributes.supported_media_commands & 1024) !== 0; this.supportsSelectSource = (newVal.attributes.supported_media_commands & 2048) !== 0; + + if (newVal.attributes.source_list !== undefined) { + this.sourceIndex = newVal.attributes.source_list.indexOf(this.source); + } } this.async(() => this.fire('iron-resize'), 500);