I have a collection called ‘competitions’ and I have assigned it to the global variable ‘Competitions’ but each time I attempt to retrieve data from the Mongo collection, I receive console errors such as Competitions.findOne is not a function
and Competitions.find is not a function
. This crashes my app.
To help debug the issue, I changed the global variable to something such as Comps
and now I don’t receive these errors. Could someone please explain to me why it seems Competitions
is some sort of reserved word or am I missing something?
Much appreciated.