aframevr / aframe-inspector

:mag: Visual inspector tool for A-Frame. Hit *<ctrl> + <alt> + i* on any A-Frame scene.
https://aframe.io/aframe-inspector/examples/
MIT License
647 stars 198 forks source link

Avoid having NaN in position field if you type a letter inadvertently #704

Closed vincentfretin closed 5 months ago

vincentfretin commented 6 months ago

From my comment in https://github.com/aframevr/aframe-inspector/pull/686#issuecomment-1844979498 If you type inadvertently some characters for position on the right panel that are not a digit, you will get a NaN in the field. A fix could be done to avoid the field to have NaN and put back the previous value or 0.

vincentfretin commented 5 months ago

I fixed it as part of #686 by putting back the previous value given in props.