Merge pull request #3547 from picklesrus/change-includes

Use indexOf instead of includes because of old browsers.
This commit is contained in:
picklesrus 2019-11-19 14:06:07 -05:00 committed by GitHub
commit 23c799dd3a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -39,7 +39,7 @@ class UsernameStep extends React.Component {
componentDidMount () {
// Send info to analytics when we aren't on the standalone page.
// If we are on the standalone join page, the page load will take care of this.
if (!window.location.pathname.includes('/join')) {
if (window.location.pathname.indexOf('/join') === -1) {
if (this.props.sendAnalytics) {
this.props.sendAnalytics('join-username-modal');
}