Index: third_party/polymer/components/neon-animation/neon-animation-runner-behavior.html |
diff --git a/third_party/polymer/components/neon-animation/neon-animation-runner-behavior.html b/third_party/polymer/components/neon-animation/neon-animation-runner-behavior.html |
index 096d5c3e078cd35f32ce581c58e25215faa519b6..2b414e25778d25722bf3117b09177a6a8b78879e 100644 |
--- a/third_party/polymer/components/neon-animation/neon-animation-runner-behavior.html |
+++ b/third_party/polymer/components/neon-animation/neon-animation-runner-behavior.html |
@@ -45,7 +45,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN |
}); |
} |
} else { |
- Polymer.Base._warn(this.is + ':', config.name, 'not found!'); |
+ console.warn(this.is + ':', config.name, 'not found!'); |
} |
} |
} |
@@ -72,27 +72,30 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN |
if (!allConfigs) { |
return; |
} |
- var allAnimations = this._configureAnimationEffects(allConfigs); |
- var allEffects = allAnimations.map(function(animation) { |
- return animation.effect; |
- }); |
+ try { |
+ var allAnimations = this._configureAnimationEffects(allConfigs); |
+ var allEffects = allAnimations.map(function(animation) { |
+ return animation.effect; |
+ }); |
- if (allEffects.length > 0) { |
- this._player = this._runAnimationEffects(allEffects); |
- this._player.onfinish = function() { |
- this._completeAnimations(allAnimations); |
+ if (allEffects.length > 0) { |
+ this._player = this._runAnimationEffects(allEffects); |
+ this._player.onfinish = function() { |
+ this._completeAnimations(allAnimations); |
- if (this._player) { |
- this._player.cancel(); |
- this._player = null; |
- } |
- |
- this.fire('neon-animation-finish', cookie, {bubbles: false}); |
- }.bind(this); |
+ if (this._player) { |
+ this._player.cancel(); |
+ this._player = null; |
+ } |
- } else { |
- this.fire('neon-animation-finish', cookie, {bubbles: false}); |
+ this.fire('neon-animation-finish', cookie, {bubbles: false}); |
+ }.bind(this); |
+ return; |
+ } |
+ } catch (e) { |
+ console.warn('Couldnt play', '(', type, allConfigs, ').', e); |
} |
+ this.fire('neon-animation-finish', cookie, {bubbles: false}); |
}, |
/** |