Some checks failed
CI / go (push) Waiting to run
CI / docker (push) Waiting to run
CI / lint-go (push) Waiting to run
CI / lint-docs (push) Waiting to run
CI / check-paperclip (push) Waiting to run
Deploy static site / Deploy to GitHub Pages (push) Has been cancelled
Deploy static site / Deploy via Docker to hatch.surf (push) Has been cancelled
Resolved conflicts by taking GitHub versions for: - .dockerignore, .gitignore, Dockerfile, README.md, docker-compose.yml Kept deploy.sh updated to: - Pull from GitHub (primary source) - Push to Gitea (push-mirror) - Build from site/ directory (GitHub structure) Co-Authored-By: Paperclip <noreply@paperclip.ing>
38 lines
1.6 KiB
JavaScript
38 lines
1.6 KiB
JavaScript
"use strict";
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
Object.defineProperty(exports, "hasInterceptionRouteInCurrentTree", {
|
|
enumerable: true,
|
|
get: function() {
|
|
return hasInterceptionRouteInCurrentTree;
|
|
}
|
|
});
|
|
const _interceptionroutes = require("../../../../shared/lib/router/utils/interception-routes");
|
|
function hasInterceptionRouteInCurrentTree([segment, parallelRoutes]) {
|
|
// If we have a dynamic segment, it's marked as an interception route by the presence of the `i` suffix.
|
|
if (Array.isArray(segment) && (segment[2] === 'di(..)(..)' || segment[2] === 'ci(..)(..)' || segment[2] === 'di(.)' || segment[2] === 'ci(.)' || segment[2] === 'di(..)' || segment[2] === 'ci(..)' || segment[2] === 'di(...)' || segment[2] === 'ci(...)')) {
|
|
return true;
|
|
}
|
|
// If segment is not an array, apply the existing string-based check
|
|
if (typeof segment === 'string' && (0, _interceptionroutes.isInterceptionRouteAppPath)(segment)) {
|
|
return true;
|
|
}
|
|
// Iterate through parallelRoutes if they exist
|
|
if (parallelRoutes) {
|
|
for(const key in parallelRoutes){
|
|
if (hasInterceptionRouteInCurrentTree(parallelRoutes[key])) {
|
|
return true;
|
|
}
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
|
|
if ((typeof exports.default === 'function' || (typeof exports.default === 'object' && exports.default !== null)) && typeof exports.default.__esModule === 'undefined') {
|
|
Object.defineProperty(exports.default, '__esModule', { value: true });
|
|
Object.assign(exports.default, exports);
|
|
module.exports = exports.default;
|
|
}
|
|
|
|
//# sourceMappingURL=has-interception-route-in-current-tree.js.map
|