Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When no onChange handler, component throws error #68

Closed
miuirussia opened this issue Mar 16, 2018 · 2 comments
Closed

When no onChange handler, component throws error #68

miuirussia opened this issue Mar 16, 2018 · 2 comments
Labels

Comments

@miuirussia
Copy link

miuirussia commented Mar 16, 2018

TypeError: _this.props.onChange is not a function. (In '_this.props.onChange(_this.editor, data, _this.editor.getValue())', '_this.props.onChange' is undefined)

Probably due to lack of verification:

if (this.props.onBeforeChange) {
if (this.continueChange) {
this.props.onChange(this.editor, data, this.editor.getValue())
}
} else {
this.props.onChange(this.editor, data, this.editor.getValue())
}
});

@miuirussia miuirussia changed the title Error, when no onChange handler When no onChange handler, component throws error Mar 16, 2018
@scniro
Copy link
Owner

scniro commented Mar 16, 2018

@miuirussia yea this looks like an issue. I can add a check for it. You should just add an onChange for now...

@scniro scniro added the bug label Mar 17, 2018
scniro added a commit that referenced this issue Mar 18, 2018
@scniro
Copy link
Owner

scniro commented Mar 18, 2018

@miuirussia fixed with 4.2.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants