atom / etch

Builds components using a simple and explicit API around virtual-dom

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Uncaught TypeError: Invalid TextEditor parameter: 'ref'

ivankravets opened this issue · comments

[Enter steps to reproduce:]

  1. Switch to Etch 0.9.0 (<0.9.0 is OK)
  2. Use the next code
import { TextEditor } from 'atom';

...
render() {
    return <TextEditor ref='filterEditor' mini={ true } />
}
...

etch: 0.9.0
Atom: 1.14.3 x64
Electron: 1.3.13
OS: Mac OS X 10.12.3

Stack Trace

Uncaught TypeError: Invalid TextEditor parameter: 'ref'

At /Applications/Atom.app/Contents/Resources/app.asar/src/text-editor.js:437

TypeError: Invalid TextEditor parameter: 'ref'
    at TextEditor.module.exports.TextEditor.update (/app.asar/src/text-editor.js:437:19)
    at updateComponent (xxxx/node_modules/etch/lib/patch.js:49:13)
    at patch (xxxx/node_modules/etch/lib/patch.js:13:19)
    at updateChildren (xxxx/node_modules/etch/lib/patch.js:72:7)
    at patch (xxxx/node_modules/etch/lib/patch.js:15:9)
    at updateSync (xxxx/node_modules/etch/lib/component-helpers.js:108:20)
    at Object.update (xxxx/node_modules/etch/lib/component-helpers.js:62:5)

@ivankravets @as-cii is in the process hot-fixing 1.14 and 1.15 with atom/atom#13887 to ignore the ref parameter and resolve this. We decided to stop removing the ref parameter from properties to avoid the overhead of creating a new object.