Update src/components/helpwidget/helpwidget.jsx

initialize widget settings on `window` before adding the script

Co-Authored-By: Ray Schamp <rschamp@users.noreply.github.com>
This commit is contained in:
chrisgarrity 2020-04-14 15:32:57 -04:00 committed by GitHub
parent 23306ff336
commit 21cc1a9780
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -28,11 +28,11 @@ class HelpWidget extends React.Component {
script.defer = true; script.defer = true;
script.onload = () => this.scriptLoaded(); script.onload = () => this.scriptLoaded();
document.body.appendChild(script);
window.fwSettings = { window.fwSettings = {
widget_id: 4000000089, widget_id: 4000000089,
locale: this.props.intl.locale locale: this.props.intl.locale
}; };
document.body.appendChild(script);
} }
} }
scriptLoaded () { scriptLoaded () {