supermedium / aframe-react

:atom: Build virtual reality experiences with A-Frame and React.
https://ngokevin.github.io/aframe-react-boilerplate/
MIT License
1.42k stars 151 forks source link

Conditional rendering Entity event listeners are added if the el is null #25

Closed edstuckey closed 8 years ago

edstuckey commented 8 years ago

I am getting an error when using conditional rendering where event listeners are trying to be added to a null element.

my fix is a change to the file lib/Index.js line 94. Wrap the event listeners for 'click' and 'loaded' in an if(el)

ngokevin commented 8 years ago

Thanks for reporting, will take a look at it.

ngokevin commented 8 years ago

if (el) { is there now