porsager / wright

🚀 Work Fast Work Wright
Do What The F*ck You Want To Public License
180 stars 15 forks source link

Mithril example crashes when removing component #20

Closed marvinhagemeister closed 6 years ago

marvinhagemeister commented 7 years ago

The mithril example seems to crash when inserting a new node inside the view function.

Steps to reproduce:

  1. Fire up mithril example
  2. Open js.js
  3. Add a second heading:
view: vnode => [
    m('h1', 'js'),
    m('h2', 'Hello World'), // <-- page crashes when inserting a new node
    // ...
  ]

Terminal message:

09:17:04.666 Error: Run error - Fix your run code and restart wright { exceptionId: 1,
  text: 'Uncaught',
  lineNumber: 0,
  columnNumber: 8,
  scriptId: '35',
  stackTrace: { callFrames: [ [Object] ] },
  exception: 
   { type: 'object',
     subtype: 'error',
     className: 'TypeError',
     description: 'TypeError: Cannot read property \'redraw\' of undefined\n    at <anonymous>:1:9',
     objectId: '{"injectedScriptId":1,"id":2}' } }
porsager commented 7 years ago

Is the "page crash" this one (tab crashed)?

screen shot 2017-03-28 at 10 30 56

Could you post some details about os / chrome version? Does this happen consistently? I couldn't reproduce it on osx, but I've seen the tab crash before but I've never been able to reproduce it :-/

It seems the error message might be unrelated since it says m on window is undefined.

marvinhagemeister commented 7 years ago

Yeah, that's the message I got. Unfortunately, it does indeed happen consistently. Haven't had the time yet to dig deeper as to what might be causing this yet.

porsager commented 6 years ago

Hi @marvinhagemeister Sorry for the very late reply. This should be fixed in the newest version (I can't reproduce it any more). Would you mind checking on your end? If it's still an issue I'll reopen the issue ;)