recurly/recurly-js — pull request #127 by chrissrogers (2014-06-09 18:32:39+00:00)
Title: Slightly refactors Pricing.attach to correctly chain dependent pricing functions

This is largely to address a question from [StackOverflow](http://stackoverflow.com/questions/24078698/recurly-js-v3-and-addons).

`Pricing.prototype.attach` would run through the binding elements, but in the case of addons would try to check for plan properties before the plan was necessarily available on the pricing instance. This ensures it gets added to the `PricingPromise` chain correctly.

Within the `PricingPromise`, reprice was being called ahead of time on the done call. This ensures it is run at the conclusion of the chain.