Back

isInstance()

Use this method to check whether you are currently in an instance object.

Name Type Required Default Description
// Use the passed in `id` when we're not already in an instance
function memberIsAdmin(){
	if(isInstance()){
		return this.admin;
	} else {
		return this.findByKey(arguments.id).admin;
	}
}
Copied!