[Front] TypeError: Cannot read property 'offsetWidth' of null

Summary

Sometimes when the surveys for delighted are trying to render present issues in the render and throw errors in bugsnag.

What is the current bug behavior?

When the site is trying to render delighted try to send a survey and founds and error trying to get the proper element.

What is the expected correct behavior?

The expected view is the render of the survey without errors.

Relevant logs and/or screenshots

image

Possible fixes

Use the "defer" attribute to load the script after the render of the site.