Skip to content

Commit

Permalink
Add the domReady! statement
Browse files Browse the repository at this point in the history
The jquery selector sometimes (depending on the amount of javascript
files) returns no values because the DOM is not ready when the script is
executed.

By adding the domReady! statement in the require part we are sure that
when the jQuery selector is being filled the DOM is ready.
  • Loading branch information
arnoudhgz committed Jan 22, 2018
1 parent d0b82cc commit a797afe
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
require([
'jquery',
'Magento_Customer/js/customer-data'
'Magento_Customer/js/customer-data',
'domReady!'
], function ($, customerData) {
'use strict';

Expand Down

0 comments on commit a797afe

Please sign in to comment.