jerel / ember-cli-loading-slider

A YouTube like loading indicator for EmberJS packaged as an Ember CLI add-on.
MIT License
116 stars 36 forks source link

Stop expanding if component is destroyed #26

Closed leizhao4 closed 8 years ago

leizhao4 commented 8 years ago

This bug is causing an type error during acceptance testing, because in the following expandItem() method, outer = this.$() is null and outerWidth = outer.width() throws an error. Adding a check to updateFn solves the problem. If the component is destroyed or destroying, stop the expanding animation and do not call expandItem.