From c2e8442fae9f14ea759a46cf9a7e498615be5f4e Mon Sep 17 00:00:00 2001 From: Sebastian Markbage Date: Mon, 2 Oct 2023 12:09:21 -0400 Subject: [PATCH] Typo --- packages/react/src/ReactTaint.js | 5 ++--- scripts/error-codes/codes.json | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/packages/react/src/ReactTaint.js b/packages/react/src/ReactTaint.js index 51afbf60d4749..d9e532737be6e 100644 --- a/packages/react/src/ReactTaint.js +++ b/packages/react/src/ReactTaint.js @@ -67,7 +67,7 @@ export function taintUniqueValue( (typeof lifetime !== 'object' && typeof lifetime !== 'function') ) { throw new Error( - 'To taint a value, a life time must be defined by passing an object that holds ' + + 'To taint a value, a lifetime must be defined by passing an object that holds ' + 'the value.', ); } @@ -95,8 +95,7 @@ export function taintUniqueValue( throw new Error( 'Cannot taint a ' + kind + - ' because the value is too general and cannot be ' + - 'a secret by', + ' because the value is too general and not unique enough to block globally.', ); } const existingEntry = TaintRegistryValues.get(entryValue); diff --git a/scripts/error-codes/codes.json b/scripts/error-codes/codes.json index 2b29b27be8b2e..be62358481bc0 100644 --- a/scripts/error-codes/codes.json +++ b/scripts/error-codes/codes.json @@ -478,9 +478,9 @@ "490": "Expected to see a Suspense boundary in this slot. The tree doesn't match so React will fallback to client rendering.", "491": "It should not be possible to postpone both at the root of an element as well as a slot below. This is a bug in React.", "492": "The \"react\" package in this environment is not configured correctly. The \"react-server\" condition must be enabled in any environment that runs React Server Components.", - "493": "To taint a value, a life time must be defined by passing an object that holds the value.", + "493": "To taint a value, a lifetime must be defined by passing an object that holds the value.", "494": "taintUniqueValue cannot taint objects or functions. Try taintObjectReference instead.", - "495": "Cannot taint a %s because the value is too general and cannot be a secret by", + "495": "Cannot taint a %s because the value is too general and not unique enough to block globally.", "496": "Only objects or functions can be passed to taintObjectReference. Try taintUniqueValue instead.", "497": "Only objects or functions can be passed to taintObjectReference." } \ No newline at end of file