We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent eaeb1e1 commit 5a984daCopy full SHA for 5a984da
src/utils/event.ts
@@ -8,11 +8,7 @@ import type { H3EventContext } from "../types/context.ts";
8
* @see H3Event
9
*/
10
export function isEvent(input: any): input is H3Event {
11
- const ctor = input?.constructor;
12
- return (
13
- ctor.__is_event__ ||
14
- input.__is_event__ /* Backward compatibility with h3 v1 */
15
- );
+ return input instanceof H3Event || input?.constructor?.__is_event__;
16
}
17
18
export function mockEvent(
0 commit comments