Skip to content

Commit d7fe496

Browse files
committed
Fix typo and change .indexOf to .some
1 parent f91d392 commit d7fe496

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ActionParameterHandler.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ export class ActionParameterHandler<T extends BaseDriver> {
110110
return value;
111111

112112
// if param value is an object and param type match, normalize its string properties
113-
if (typeof value === "object" && ["queries", "headers", "path-params", "cookies"].indexOf(param.type) !== -1) {
113+
if (typeof value === "object" && ["queries", "headers", "path-params", "cookies"].some(paramType => paramType === param.type)) {
114114
Object.keys(value).map(key => {
115115
const keyValue = (value as any)[key];
116116
if (typeof keyValue === "string") {
@@ -122,7 +122,7 @@ export class ActionParameterHandler<T extends BaseDriver> {
122122
}
123123
});
124124
}
125-
// if value is a string, normalize it to demand type
125+
// if value is a string, normalize it to demanded type
126126
else if (typeof value === "string") {
127127
switch (param.targetName) {
128128
case "number":

0 commit comments

Comments
 (0)