zenoamaro/react-quill

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

Open

#498 建立於 2019年7月8日

在 GitHub 查看
 (6 留言) (7 反應) (0 負責人)JavaScript (860 fork)batch import
good first issuehelp wanted

倉庫指標

Star
 (6,238 star)
PR 合併指標
 (30 天內沒有已合併 PR)

描述

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

貢獻者指南