"Cannot read property "quoteData" of undefined"

Hi,

Described problem is random and problably needs some tuning of JS loading style. Scenario below:

  1. /checkout/ page (for “one step checkout” mode)
  2. Randomly: everything renders fine and randomly gives error as on screen below:

Cannot read property "quoteData” of undefined" from quote.js

  1. Those “quoteData” is from window.checkoutConfig which is generated by server-side with

  1. Generating checkoutConfig loads a while (~800ms), and JS-es randomly loads faster than DOM is rendered.

  1. Sometimes (rarely, by random) other variable in quote.js cannot be read becase checkoutConfig hasn’t been rendered yet.

OK, it’s related to:

We fixed this by adding domReady! in quote.js. Works fine.