Error when unmount tag that contains ref element #2083

Closed
syuilo opened this Issue Nov 23, 2016 · 0 comments

Projects

None yet

2 participants

@syuilo
syuilo commented Nov 23, 2016 edited

Help us to manage our issues by answering the following:

Describe your issue:

Error occured when unmount tag that contains ref element.

<my-tag>
  <div ref='test'></div>
  <button onclick={ unmount }>unmount</button>
</my-tag>

Uncaught TypeError: Cannot read property 'setAttribute' of undefined(…)

For details, please refer to the example below.

Can you reproduce the issue?

http://jsfiddle.net/wf7bkvur/131/

If without ref attribute, no error occurs:
http://jsfiddle.net/wf7bkvur/132/

Which version of Riot does it affect?

v3.0.0

How would you tag this issue?

  • Question
  • Bug
  • Discussion
  • Feature request
  • Tip
  • Enhancement
  • Performance

Thanks, Great lib! ❤️ cheers 🍺

@GianlucaGuarini GianlucaGuarini added a commit that closed this issue Nov 26, 2016
@GianlucaGuarini GianlucaGuarini closes #2083 bcdcf5c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment