From 771d9505cce955dcce42b86078a4b37db266f48a Mon Sep 17 00:00:00 2001 From: Fabien Franzen Date: Fri, 10 Oct 2014 14:32:14 +0200 Subject: [PATCH] Allow 'rel' and 'relation' --- lib/include.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/include.js b/lib/include.js index e3307dbb..3afa1c02 100644 --- a/lib/include.js +++ b/lib/include.js @@ -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) {