Skip to content

Commit a23d682

Browse files
committed
Use types.flat() to handle 'is' arguments
1 parent 0d142f0 commit a23d682

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

lib/request.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,7 @@ class Request {
5252
* @param {...String|Array} types
5353
*/
5454
is(...types) {
55-
if (types.length === 1 && Array.isArray(types[0])) {
56-
types = types[0];
57-
}
58-
59-
return typeis(this, types) || false;
55+
return typeis(this, types.flat()) || false;
6056
}
6157
}
6258

0 commit comments

Comments
 (0)