I created a function that checks if the link matches the path. Everything works when I'm running the local server, but on the build process it fails with the error "Cannot read property 'includes' of undefined'. While i'm digging into the error, what's the best way to reformat this function without using includes()?
matchLink = (link, path) => {
return path.includes(link)
};
pathis undefined, thus does not have an includes method.