Allow 'rel' and 'relation'
This commit is contained in:
parent
0c28ccedac
commit
771d9505cc
|
@ -14,9 +14,10 @@ function normalizeInclude(include) {
|
|||
} else if (isPlainObject(include)) {
|
||||
// Build an array of key/value pairs
|
||||
var newInclude = [];
|
||||
if (typeof include.relation === 'string' && isPlainObject(include.scope)) {
|
||||
var rel = include.rel || include.relation;
|
||||
if (typeof rel === 'string' && isPlainObject(include.scope)) {
|
||||
var obj = {};
|
||||
obj[include.relation] = new IncludeScope(include.scope);
|
||||
obj[rel] = new IncludeScope(include.scope);
|
||||
newInclude.push(obj);
|
||||
} else {
|
||||
for (var key in include) {
|
||||
|
|
Loading…
Reference in New Issue