replaced anonymous function with named function: warnIfUnsavedChangesCaller

This commit is contained in:
Sai Jatin K 2020-07-07 00:31:56 +05:30
parent 707db59458
commit 1a78cebd3b
No known key found for this signature in database
GPG key ID: 58A469B796EA80DF

View file

@ -204,6 +204,10 @@ class IDEView extends React.Component {
}
}
warnIfUnsavedChangesCaller(props) {
return warnIfUnsavedChanges(props);
}
render() {
return (
<div className="ide">
@ -212,7 +216,7 @@ class IDEView extends React.Component {
</Helmet>
{this.props.toast.isVisible && <Toast />}
<Nav
warnIfUnsavedChanges={() => warnIfUnsavedChanges(this.props)}
warnIfUnsavedChanges={this.warnIfUnsavedChangesCaller.bind(this, this.props)}
cmController={this.cmController}
/>
<Toolbar />