Skip to content

Commit c9caf2d

Browse files
committed
Fix tests and dependencies
1 parent 45c6146 commit c9caf2d

19 files changed

+677
-575
lines changed

lib/common/iff-else.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ module.exports = function (processFuncArray) {
88

99
// Babel 6.17.0 did not transpile something in the old version similar to this
1010
// const runProcessFuncArray = funcs => processFuncArray.call(this, fnArgs, funcs);
11-
var that = this;
12-
var runProcessFuncArray = function (funcs) {
11+
const that = this;
12+
const runProcessFuncArray = function (funcs) {
1313
return processFuncArray.call(that, fnArgs, funcs);
1414
};
1515

1616
// const check = typeof predicate === 'function' ? predicate(...fnArgs) : !!predicate;
17-
var check = typeof predicate === 'function' ? predicate.apply(that, fnArgs) : !!predicate;
17+
const check = typeof predicate === 'function' ? predicate.apply(that, fnArgs) : !!predicate;
1818

1919
if (!check) {
2020
return runProcessFuncArray(falseFuncs);

lib/services/calling-params.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const defaults = {
1010
};
1111

1212
// Set app wide defaults
13-
function callingParamsDefaults (defaultPropNames = [], defaultNewProps) {
13+
function callingParamsDefaults (defaultPropNames = [], defaultNewProps = undefined) {
1414
if (defaultPropNames) {
1515
defaults.propNames = Array.isArray(defaultPropNames) ? defaultPropNames : [defaultPropNames];
1616
}

lib/services/fast-join.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ module.exports = function fastJoin (joins1, query1) {
2626
};
2727
};
2828

29-
function joinsForQuery ({ joins } = {}, query, context = {}) {
29+
function joinsForQuery ({ joins } = {}, query = undefined, context = {}) {
3030
const runtime = [];
3131

3232
Object.keys(joins).forEach(outerLabel => {

lib/services/fgraphql.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@ module.exports = function fgraphql (options1 = {}) {
6969
}
7070

7171
options.inclAllFields = contextParams.provider
72-
? options.inclAllFieldsClient : options.inclAllFieldsServer;
72+
? options.inclAllFieldsClient
73+
: options.inclAllFieldsServer;
7374
debug(`inclAllField ${options.inclAllFields}`);
7475

7576
// Build content parameter passed to resolver functions.

lib/services/populate.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,8 @@ function populateAddChild (options, context, parentItem, childSchema, depth) {
239239
});
240240

241241
return (childSchema.include && result)
242-
? populateItemArray(options, context, result, include, depth) : result;
242+
? populateItemArray(options, context, result, include, depth)
243+
: result;
243244
})
244245
.then(items => ({ nameAs, items }));
245246
}

lib/services/stash-before.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,13 @@ module.exports = function (prop) {
1616
throw new errors.BadRequest('Id is required. (stashBefore)');
1717
}
1818

19-
const params = context.method === 'get' ? context.params : {
20-
provider: context.params.provider,
21-
authenticated: context.params.authenticated,
22-
user: context.params.user
23-
};
19+
const params = context.method === 'get'
20+
? context.params
21+
: {
22+
provider: context.params.provider,
23+
authenticated: context.params.authenticated,
24+
user: context.params.user
25+
};
2426

2527
return context.service.get(context.id, {
2628
...params,

0 commit comments

Comments
 (0)