question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

False positive "You are passing the delta object from the onChange event back as value"

See original GitHub issue

In my case, when both nextContents and this.lastDeltaChangeSet are undefined, I get this error. It happens in a real scenario when I switch between 2 records, and component.js componentWillReceiveProps gets called

From component.js:

if (nextContents === this.lastDeltaChangeSet) {
        console.error(nextContents, this.lastDeltaChangeSet)
        throw new Error(
          'You are passing the `delta` object from the `onChange` event back ' +
            'as `value`. You most probably want `editor.getContents()` instead. ' +
            'See: https://github.com/zenoamaro/react-quill#using-deltas'
        )
      }

React-Quill version

1.3.3

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:5
  • Comments:6

github_iconTop GitHub Comments

25reactions
dashixiong-11commented, Aug 6, 2021

<Form.Item initialValue='' name='content' label='内容' rules={[{required: true}]}> <ReactQuill ref={quillRef} theme="snow" value='' modules={_qModules}/> </Form.Item> You need to set an initial value

6reactions
Frozen-bytecommented, Sep 9, 2019

Had the same issue, as a workaround I initialize the passed value as an empty String:

constructor() {
  this.state = {
    quillContent: props.value || props.defaultValue || "",
  }
}
 ...

render() {
  return <ReactQuill value={quillContent}/>
}

A value={quillContent || ""} also should work if you’re lazy.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to get rid of ReactQuill Unhandled Runtime Error?
Screenshot of Error Unhandled Runtime Error Error: You are passing the delta object from the onchange event back as value.
Read more >
react-quill - npm
Do not use the delta object you receive from the onChange event as value . This object does not contain the full document,...
Read more >
Numbers and dates - JavaScript - MDN Web Docs - Mozilla
This chapter introduces the concepts, objects and functions used to work with and perform calculations using numbers and dates in JavaScript.
Read more >
Assertions | Cypress Documentation
Cypress bundles the popular Chai assertion library, as well as helpful extensions for Sinon and jQuery, bringing you dozens of powerful assertions for....
Read more >
Machine Learning Glossary - Google Developers
FP is the number of false positives (incorrect predictions). ... AUC ignores any value you set for classification threshold.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found