There was an error while loading. Please reload this page.
1 parent b6907e6 commit 44e2ae3Copy full SHA for 44e2ae3
1 file changed
src/fs_routes.ts
@@ -36,8 +36,9 @@ export interface FsRouteFile<State> {
36
37
// deno-lint-ignore no-explicit-any
38
function isFreshFile<State>(mod: any): mod is FreshFsMod<State> {
39
- return mod !== null && typeof mod === "object" &&
40
- typeof mod.default === "function" ||
+ if (mod === null || typeof mod !== "object") return false;
+
41
+ return typeof mod.default === "function" ||
42
typeof mod.config === "object" || typeof mod.handlers === "object" ||
43
typeof mod.handlers === "function" || typeof mod.handler === "object" ||
44
typeof mod.handler === "function";
0 commit comments