Skip to content
This repository was archived by the owner on May 10, 2021. It is now read-only.

Commit b828bab

Browse files
fix: inline isDynamicRoute to avoid sls-next issues (#180)
1 parent ed1376d commit b828bab

File tree

3 files changed

+22485
-1483
lines changed

3 files changed

+22485
-1483
lines changed

lib/helpers/isDynamicRoute.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Return true if the route uses dynamic routing (e.g., [id] or [...slug])
2-
const {
3-
default: isDynamicRoute,
4-
} = require("@sls-next/lambda-at-edge/dist/lib/isDynamicRoute");
2+
const isDynamicRoute = (route) => {
3+
return /\/\[[^\/]+?](?=\/|$)/.test(route);
4+
};
55

66
module.exports = isDynamicRoute;

0 commit comments

Comments
 (0)