Skip to content

Commit 91b311f

Browse files
lindsaylevineehmicky
authored andcommitted
fix: support isDynamicRoute in sls-next >=1.8.0 (#266)
1 parent 2bdbd5b commit 91b311f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Diff for: src/lib/helpers/isDynamicRoute.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
// Return true if the route uses dynamic routing (e.g., [id] or [...slug])
2-
const { default: isDynamicRoute } = require('@sls-next/lambda-at-edge/dist/lib/isDynamicRoute')
2+
// @sls-next <= 1.7.0 uses default, >= 1.8.0 no longer does
3+
const {
4+
default: oldIsDynamicRoute,
5+
isDynamicRoute = oldIsDynamicRoute,
6+
} = require('@sls-next/lambda-at-edge/dist/lib/isDynamicRoute')
37

48
module.exports = isDynamicRoute

0 commit comments

Comments
 (0)