Skip to content

Commit 66a3244

Browse files
committedJul 25, 2018
fix(dynamic): Use 'find' from common.ts instead of Array.prototype.find
Closes #215
1 parent cfdf04f commit 66a3244

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎src/params/param.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* @coreapi
33
* @module params
44
*/ /** for typedoc */
5-
import { extend, filter, map, allTrueR } from '../common/common';
5+
import { extend, filter, map, allTrueR, find } from '../common/common';
66
import { prop } from '../common/hof';
77
import { isInjectable, isDefined, isString, isArray, isUndefined } from '../common/predicates';
88
import { RawParams, ParamDeclaration } from '../params/interface';
@@ -29,7 +29,7 @@ export { DefType };
2929

3030
function getParamDeclaration(paramName: string, location: DefType, state: StateDeclaration): ParamDeclaration {
3131
const noReloadOnSearch = (state.reloadOnSearch === false && location === DefType.SEARCH) || undefined;
32-
const dynamic = [state.dynamic, noReloadOnSearch].find(isDefined);
32+
const dynamic = find([state.dynamic, noReloadOnSearch], isDefined);
3333
const defaultConfig = isDefined(dynamic) ? { dynamic } : {};
3434
const paramConfig = unwrapShorthand(state && state.params && state.params[paramName]);
3535
return extend(defaultConfig, paramConfig);

0 commit comments

Comments
 (0)
Please sign in to comment.