meteor-astronomy
meteor-astronomy copied to clipboard
isModified is not a function
I'm sorry if it's obvious, but I can't find what's wrong here with my class named Service.
const servClass = new Service();
console.log('Created a new Service class instance.', servClass);
console.log('isModified', servClass.isModified());
If I execute this code, I get this error:
Uncaught TypeError: servClass.isModified is not a function
If I inspect my class object printed to the console, I do see in the class __proto__
some functions as raw
, validate
, set
, etc. but I don't see functions such as isModified
.
From my understanding of the documentation, I would have thought that all class instance objects would come with these functions... no?
What am I missing?
It's only true for classes that have collection attached to it, so that's why you don't see this method.
Aaaahh! That explains a lot! Thanks for the info! Is it indicated somewhere in the docs? I haven't seent anything about it...
No, I think documentation doesn't mention it. It would be great if you could make a PR and add proper info.
I've never done that before, I'll see what I can do to contribute!
I can help you with that :) it's not difficult. There is the gh-pages
branch in which you have all the documentation. In this file you have a description of the isModified
method. So you can just modify this file and create PR from the level of GitHub. Once, I accept this PR it will be automatically pushed to the docs.