this could be simplified to ```var endpoints = relation.endpoints || relation.get('endpoints');```