zenoamaro/react-quill

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

Open

#498 aberto em 8 de jul. de 2019

Ver no GitHub
 (6 comments) (7 reactions) (0 assignees)JavaScript (860 forks)batch import
good first issuehelp wanted

Métricas do repositório

Stars
 (6.238 stars)
Métricas de merge de PR
 (Nenhuma PRs mesclada em 30d)

Description

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

Guia do colaborador