Closed shaunanoordin closed 8 years ago
?
is the existential operator. In this case it is checking if module
, a reference to the current module, isn't null or undefined. I'm not sure what the specific potential error it may be checking against, but it was the coding style of a previous developer, and he contributed that component to Wildcam when it was being developed. As to why Windows fails to compile it... I have no idea. IMO, it's not necessary and can be removed.
Thanks @srallen! Looks like we've got an operator that maybe shouldn't be there... perhaps this is an existential crisis. I saw the comments made by @brian-c in PFE issue 2775 too, so I've pushed a similar #224 to get rid of ?.
Issue(?): running
npm start
on a Windows 10 machine with Git Shell will result in an error, preventing the app from compiling.Analysis:
So all this time, I've been running
wildcam-gorongosa
on my office Macbook, and it's been compiling/running fine. At this moment though, I'm running WG from my Windows 10 Surface Pro 3 Machine with Git Shell, and when I try to compile/run the app I receive the above error.A quick trace revealed that in
app/partials/footer-logo.cjsx
there's this line of code...module?.exports = React.createClass
that when changed to...
module.exports = React.createClass
will fix my Windows-specific issue.
I was able to properly test #222 by temporarily removing the
?
, but I'm curious to know whymodule?.exports
exists, and only specific tofooter-logo.cjsx
. I have no idea what themodules?.
does in this context as my Coffee-Fu is weak. (It's decaf, really.) @srallen , do you have any insights into this?