New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

neogarden

Package Overview
Dependencies
Maintainers
1
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

neogarden - npm Package Compare versions

Comparing version 0.0.7 to 0.0.8

hooks/useGlobal.ts

2

package.json
{
"name": "neogarden",
"version": "0.0.7",
"version": "0.0.8",
"type": "module",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -16,2 +16,7 @@ import { getClient } from "./getClient";

const config = getConfig();
if (!config?.prismic?.routes) {
return {
error: `Prismic routes in configuration not found, please add them!`,
};
}
const options = {

@@ -27,5 +32,7 @@ fetchLinks,

if (route === undefined) {
return { error: "Route match in configuration not found" };
return {
error: `Prismic routes in configuration did not match with current route!`,
};
}
return getPage(route, client, parsed, options);
}

@@ -8,3 +8,9 @@ import { redirect } from "remix";

// Redirect the user to first language from configuration
return redirect(`/${Object.keys(config.prismic.locales)[0]}`);
if (config?.prismic?.locales && config.prismic.locales.length > 0) {
return redirect(`/${Object.keys(config.prismic.locales)[0]}`);
}
// Return error as a fallback
return {
error: `Automatic redirect failed because no locale was found in configuration, please add at least one!`,
};
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc