I have created a small module to add a product automatically at cart when a specific coupon code is applied. All is working fine except the product image is missing for the first time, but it shows the image after a refreshing full page.
In my findings, KnockoutJS is working on this section to generate image/dom related stuff. Dom is not being ready properly as the product is added automatically.
I am not really sure what to do. Any help would be appreciated. Thank you.
Update: I added a new repo on GitHub for code review as it contains more codes. Please follow the link.