globalseo
Advanced tools
Comparing version 2.2.25 to 2.2.26
{ | ||
"name": "globalseo", | ||
"version": "2.2.25", | ||
"version": "2.2.26", | ||
"description": "Translate your React.js or Next.js app with AI", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -23,4 +23,11 @@ const { getGlobalseoOptions, OLD_EXCLUDE_CLASS } = require("../configs"); | ||
return globalseoOptions.excludePaths.length && globalseoOptions.excludePaths.some(excludePath => excludePath && path.startsWith(excludePath)) | ||
return globalseoOptions.excludePaths.length && globalseoOptions.excludePaths.some(excludePath => { | ||
if (!excludePath) return false; | ||
const isEndedWithStar = excludePath.endsWith('/*'); | ||
if (isEndedWithStar) return path.startsWith(excludePath.slice(0, -1)); | ||
const isEndedWithSlash = excludePath.endsWith('/'); | ||
const withoutSlashPath = isEndedWithSlash ? excludePath.slice(0, -1) : excludePath; | ||
return (path === excludePath) || (path == withoutSlashPath); | ||
}) | ||
} | ||
exports.isExcludedPath = isExcludedPath; |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
584739
3676