AutosuggestTextarea: bind this, fix crash in older browsers

This commit is contained in:
Alex Gleason 2023-01-23 15:57:49 -06:00
parent de375cdb15
commit f244bd3ce1
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7

View file

@ -157,7 +157,8 @@ class AutosuggestTextarea extends ImmutablePureComponent<IAutosuggesteTextarea>
if (lastTokenUpdated && !valueUpdated) {
return false;
} else {
return super.shouldComponentUpdate!(nextProps, nextState, undefined);
// https://stackoverflow.com/a/35962835
return super.shouldComponentUpdate!.bind(this)(nextProps, nextState, undefined);
}
}