I have created a settings.json file. I call a Method from the client using
Within the method I get the value of a property in the JSON file using
When I console log this, the correct value appears in the server console (my text editor). However, in my client browser console, I get this error:
methods.js:77 Uncaught (in promise) TypeError: Cannot read property 'X' of undefined
Where ‘X’ is the name of my sub-property. It is essentially saying that ‘private’ is undefined.
I don’t understand why this is getting thrown? I thought Method implementations were server side, not client side?
Should I be wrapping Method code inside a
Meteor.isServer if condition?