diff --git a/packages/@sanity/vision/README.md b/packages/@sanity/vision/README.md index 969cb9093f2a..b5eaaba4f3e9 100644 --- a/packages/@sanity/vision/README.md +++ b/packages/@sanity/vision/README.md @@ -68,11 +68,11 @@ export default defineConfig({ visionTool(), ], tools: (prev, {currentUser}) => { - const isAdmin = currentUser?.roles.some(role => role.name === 'administrator'); - + const isAdmin = currentUser?.roles.some((role) => role.name === 'administrator') + // If the user has the administrator role, return all tools. // If the user does not have the administrator role, filter out the vision tool. - return isAdmin ? prev : prev.filter(tool => tool.name !== 'vision'); + return isAdmin ? prev : prev.filter((tool) => tool.name !== 'vision') }, }) ```