Skip to content

Commit 1cb4186

Browse files
committed
Fix: error messages (#27523)
<!-- Thanks for submitting a pull request! We appreciate you spending the time to work on these changes. Please provide enough information so that others can review your pull request. The three fields below are mandatory. Before submitting a pull request, please make sure the following is done: 1. Fork [the repository](https://github.com/facebook/react) and create your branch from `main`. 2. Run `yarn` in the repository root. 3. If you've fixed a bug or added code that should be tested, add tests! 4. Ensure the test suite passes (`yarn test`). Tip: `yarn test --watch TestName` is helpful in development. 5. Run `yarn test --prod` to test in the production environment. It supports the same options as `yarn test`. 6. If you need a debugger, run `yarn test --debug --watch TestName`, open `chrome://inspect`, and press "Inspect". 7. Format your code with [prettier](https://github.com/prettier/prettier) (`yarn prettier`). 8. Make sure your code lints (`yarn lint`). Tip: `yarn linc` to only check changed files. 9. Run the [Flow](https://flowtype.org/) type checks (`yarn flow`). 10. If you haven't already, complete the CLA. Learn more about contributing: https://reactjs.org/docs/how-to-contribute.html --> ## Summary Changes `before before` to `before` in error messages. <!-- Explain the **motivation** for making this change. What existing problem does the pull request solve? --> I want to improve error logs ## How did you test this change? <!-- Demonstrate the code is solid. Example: The exact commands you ran and their output, screenshots / videos if the pull request changes the user interface. How exactly did you verify that your PR solves the issue you wanted to solve? If you leave this empty, your PR will very likely be closed. --> DiffTrain build for [67cc9ba](67cc9ba)
1 parent 40c1118 commit 1cb4186

20 files changed

+65
-65
lines changed

compiled/facebook-www/JSXDEVRuntime-dev.classic.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -788,7 +788,7 @@ function checkKeyStringCoercion(value) {
788788
if (willCoercionThrow(value)) {
789789
error(
790790
"The provided key is an unsupported type %s." +
791-
" This value must be coerced to a string before before using it here.",
791+
" This value must be coerced to a string before using it here.",
792792
typeName(value)
793793
);
794794

compiled/facebook-www/JSXDEVRuntime-dev.modern.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -788,7 +788,7 @@ function checkKeyStringCoercion(value) {
788788
if (willCoercionThrow(value)) {
789789
error(
790790
"The provided key is an unsupported type %s." +
791-
" This value must be coerced to a string before before using it here.",
791+
" This value must be coerced to a string before using it here.",
792792
typeName(value)
793793
);
794794

compiled/facebook-www/REVISION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
309c8ad9688c491e5b17beb07ab01d65594914ce
1+
67cc9ba8789335b9da0838a446137c1be62adbcd

compiled/facebook-www/React-dev.classic.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ if (
2727
}
2828
"use strict";
2929

30-
var ReactVersion = "18.3.0-www-classic-fe25c3f7";
30+
var ReactVersion = "18.3.0-www-classic-b6ac59ca";
3131

3232
// ATTENTION
3333
// When adding new symbols to this file,
@@ -460,7 +460,7 @@ function checkKeyStringCoercion(value) {
460460
if (willCoercionThrow(value)) {
461461
error(
462462
"The provided key is an unsupported type %s." +
463-
" This value must be coerced to a string before before using it here.",
463+
" This value must be coerced to a string before using it here.",
464464
typeName(value)
465465
);
466466

compiled/facebook-www/React-dev.modern.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ if (
2727
}
2828
"use strict";
2929

30-
var ReactVersion = "18.3.0-www-modern-872bdfba";
30+
var ReactVersion = "18.3.0-www-modern-8a5fff1f";
3131

3232
// ATTENTION
3333
// When adding new symbols to this file,
@@ -460,7 +460,7 @@ function checkKeyStringCoercion(value) {
460460
if (willCoercionThrow(value)) {
461461
error(
462462
"The provided key is an unsupported type %s." +
463-
" This value must be coerced to a string before before using it here.",
463+
" This value must be coerced to a string before using it here.",
464464
typeName(value)
465465
);
466466

compiled/facebook-www/React-prod.classic.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -587,4 +587,4 @@ exports.useSyncExternalStore = function (
587587
exports.useTransition = function () {
588588
return ReactCurrentDispatcher.current.useTransition();
589589
};
590-
exports.version = "18.3.0-www-classic-c9d845f9";
590+
exports.version = "18.3.0-www-classic-1a677f82";

compiled/facebook-www/React-prod.modern.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -579,4 +579,4 @@ exports.useSyncExternalStore = function (
579579
exports.useTransition = function () {
580580
return ReactCurrentDispatcher.current.useTransition();
581581
};
582-
exports.version = "18.3.0-www-modern-5f20e279";
582+
exports.version = "18.3.0-www-modern-a28e1532";

compiled/facebook-www/ReactART-dev.classic.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ function _assertThisInitialized(self) {
6969
return self;
7070
}
7171

72-
var ReactVersion = "18.3.0-www-classic-69d5173c";
72+
var ReactVersion = "18.3.0-www-classic-4668f682";
7373

7474
var LegacyRoot = 0;
7575
var ConcurrentRoot = 1;
@@ -5340,7 +5340,7 @@ function checkPropStringCoercion(value, propName) {
53405340
if (willCoercionThrow(value)) {
53415341
error(
53425342
"The provided `%s` prop is an unsupported type %s." +
5343-
" This value must be coerced to a string before before using it here.",
5343+
" This value must be coerced to a string before using it here.",
53445344
propName,
53455345
typeName(value)
53465346
);

compiled/facebook-www/ReactART-dev.modern.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ function _assertThisInitialized(self) {
6969
return self;
7070
}
7171

72-
var ReactVersion = "18.3.0-www-modern-9f677f37";
72+
var ReactVersion = "18.3.0-www-modern-e16a234e";
7373

7474
var LegacyRoot = 0;
7575
var ConcurrentRoot = 1;
@@ -5096,7 +5096,7 @@ function checkPropStringCoercion(value, propName) {
50965096
if (willCoercionThrow(value)) {
50975097
error(
50985098
"The provided `%s` prop is an unsupported type %s." +
5099-
" This value must be coerced to a string before before using it here.",
5099+
" This value must be coerced to a string before using it here.",
51005100
propName,
51015101
typeName(value)
51025102
);

compiled/facebook-www/ReactDOM-dev.classic.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2776,7 +2776,7 @@ function checkAttributeStringCoercion(value, attributeName) {
27762776
if (willCoercionThrow(value)) {
27772777
error(
27782778
"The provided `%s` attribute is an unsupported type %s." +
2779-
" This value must be coerced to a string before before using it here.",
2779+
" This value must be coerced to a string before using it here.",
27802780
attributeName,
27812781
typeName(value)
27822782
);
@@ -2790,7 +2790,7 @@ function checkKeyStringCoercion(value) {
27902790
if (willCoercionThrow(value)) {
27912791
error(
27922792
"The provided key is an unsupported type %s." +
2793-
" This value must be coerced to a string before before using it here.",
2793+
" This value must be coerced to a string before using it here.",
27942794
typeName(value)
27952795
);
27962796

@@ -2803,7 +2803,7 @@ function checkPropStringCoercion(value, propName) {
28032803
if (willCoercionThrow(value)) {
28042804
error(
28052805
"The provided `%s` prop is an unsupported type %s." +
2806-
" This value must be coerced to a string before before using it here.",
2806+
" This value must be coerced to a string before using it here.",
28072807
propName,
28082808
typeName(value)
28092809
);
@@ -2817,7 +2817,7 @@ function checkCSSPropertyStringCoercion(value, propName) {
28172817
if (willCoercionThrow(value)) {
28182818
error(
28192819
"The provided `%s` CSS property is an unsupported type %s." +
2820-
" This value must be coerced to a string before before using it here.",
2820+
" This value must be coerced to a string before using it here.",
28212821
propName,
28222822
typeName(value)
28232823
);
@@ -2831,7 +2831,7 @@ function checkHtmlStringCoercion(value) {
28312831
if (willCoercionThrow(value)) {
28322832
error(
28332833
"The provided HTML markup uses a value of unsupported type %s." +
2834-
" This value must be coerced to a string before before using it here.",
2834+
" This value must be coerced to a string before using it here.",
28352835
typeName(value)
28362836
);
28372837

@@ -2845,7 +2845,7 @@ function checkFormFieldValueStringCoercion(value) {
28452845
error(
28462846
"Form field values (value, checked, defaultValue, or defaultChecked props)" +
28472847
" must be strings, not %s." +
2848-
" This value must be coerced to a string before before using it here.",
2848+
" This value must be coerced to a string before using it here.",
28492849
typeName(value)
28502850
);
28512851

@@ -34071,7 +34071,7 @@ function createFiberRoot(
3407134071
return root;
3407234072
}
3407334073

34074-
var ReactVersion = "18.3.0-www-classic-fd47809d";
34074+
var ReactVersion = "18.3.0-www-classic-9360aec2";
3407534075

3407634076
function createPortal$1(
3407734077
children,

compiled/facebook-www/ReactDOM-dev.modern.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2133,7 +2133,7 @@ function checkAttributeStringCoercion(value, attributeName) {
21332133
if (willCoercionThrow(value)) {
21342134
error(
21352135
"The provided `%s` attribute is an unsupported type %s." +
2136-
" This value must be coerced to a string before before using it here.",
2136+
" This value must be coerced to a string before using it here.",
21372137
attributeName,
21382138
typeName(value)
21392139
);
@@ -2147,7 +2147,7 @@ function checkKeyStringCoercion(value) {
21472147
if (willCoercionThrow(value)) {
21482148
error(
21492149
"The provided key is an unsupported type %s." +
2150-
" This value must be coerced to a string before before using it here.",
2150+
" This value must be coerced to a string before using it here.",
21512151
typeName(value)
21522152
);
21532153

@@ -2160,7 +2160,7 @@ function checkPropStringCoercion(value, propName) {
21602160
if (willCoercionThrow(value)) {
21612161
error(
21622162
"The provided `%s` prop is an unsupported type %s." +
2163-
" This value must be coerced to a string before before using it here.",
2163+
" This value must be coerced to a string before using it here.",
21642164
propName,
21652165
typeName(value)
21662166
);
@@ -2174,7 +2174,7 @@ function checkCSSPropertyStringCoercion(value, propName) {
21742174
if (willCoercionThrow(value)) {
21752175
error(
21762176
"The provided `%s` CSS property is an unsupported type %s." +
2177-
" This value must be coerced to a string before before using it here.",
2177+
" This value must be coerced to a string before using it here.",
21782178
propName,
21792179
typeName(value)
21802180
);
@@ -2188,7 +2188,7 @@ function checkHtmlStringCoercion(value) {
21882188
if (willCoercionThrow(value)) {
21892189
error(
21902190
"The provided HTML markup uses a value of unsupported type %s." +
2191-
" This value must be coerced to a string before before using it here.",
2191+
" This value must be coerced to a string before using it here.",
21922192
typeName(value)
21932193
);
21942194

@@ -2202,7 +2202,7 @@ function checkFormFieldValueStringCoercion(value) {
22022202
error(
22032203
"Form field values (value, checked, defaultValue, or defaultChecked props)" +
22042204
" must be strings, not %s." +
2205-
" This value must be coerced to a string before before using it here.",
2205+
" This value must be coerced to a string before using it here.",
22062206
typeName(value)
22072207
);
22082208

@@ -33916,7 +33916,7 @@ function createFiberRoot(
3391633916
return root;
3391733917
}
3391833918

33919-
var ReactVersion = "18.3.0-www-modern-527c0eab";
33919+
var ReactVersion = "18.3.0-www-modern-a17326c6";
3392033920

3392133921
function createPortal$1(
3392233922
children,

compiled/facebook-www/ReactDOMServer-dev.classic.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ if (__DEV__) {
1919
var React = require("react");
2020
var ReactDOM = require("react-dom");
2121

22-
var ReactVersion = "18.3.0-www-classic-d0c392db";
22+
var ReactVersion = "18.3.0-www-classic-c2fb22b9";
2323

2424
// This refers to a WWW module.
2525
var warningWWW = require("warning");
@@ -286,7 +286,7 @@ function checkAttributeStringCoercion(value, attributeName) {
286286
if (willCoercionThrow(value)) {
287287
error(
288288
"The provided `%s` attribute is an unsupported type %s." +
289-
" This value must be coerced to a string before before using it here.",
289+
" This value must be coerced to a string before using it here.",
290290
attributeName,
291291
typeName(value)
292292
);
@@ -300,7 +300,7 @@ function checkCSSPropertyStringCoercion(value, propName) {
300300
if (willCoercionThrow(value)) {
301301
error(
302302
"The provided `%s` CSS property is an unsupported type %s." +
303-
" This value must be coerced to a string before before using it here.",
303+
" This value must be coerced to a string before using it here.",
304304
propName,
305305
typeName(value)
306306
);
@@ -314,7 +314,7 @@ function checkHtmlStringCoercion(value) {
314314
if (willCoercionThrow(value)) {
315315
error(
316316
"The provided HTML markup uses a value of unsupported type %s." +
317-
" This value must be coerced to a string before before using it here.",
317+
" This value must be coerced to a string before using it here.",
318318
typeName(value)
319319
);
320320

compiled/facebook-www/ReactDOMServer-dev.modern.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ if (__DEV__) {
1919
var React = require("react");
2020
var ReactDOM = require("react-dom");
2121

22-
var ReactVersion = "18.3.0-www-modern-9f677f37";
22+
var ReactVersion = "18.3.0-www-modern-e16a234e";
2323

2424
// This refers to a WWW module.
2525
var warningWWW = require("warning");
@@ -286,7 +286,7 @@ function checkAttributeStringCoercion(value, attributeName) {
286286
if (willCoercionThrow(value)) {
287287
error(
288288
"The provided `%s` attribute is an unsupported type %s." +
289-
" This value must be coerced to a string before before using it here.",
289+
" This value must be coerced to a string before using it here.",
290290
attributeName,
291291
typeName(value)
292292
);
@@ -300,7 +300,7 @@ function checkCSSPropertyStringCoercion(value, propName) {
300300
if (willCoercionThrow(value)) {
301301
error(
302302
"The provided `%s` CSS property is an unsupported type %s." +
303-
" This value must be coerced to a string before before using it here.",
303+
" This value must be coerced to a string before using it here.",
304304
propName,
305305
typeName(value)
306306
);
@@ -314,7 +314,7 @@ function checkHtmlStringCoercion(value) {
314314
if (willCoercionThrow(value)) {
315315
error(
316316
"The provided HTML markup uses a value of unsupported type %s." +
317-
" This value must be coerced to a string before before using it here.",
317+
" This value must be coerced to a string before using it here.",
318318
typeName(value)
319319
);
320320

compiled/facebook-www/ReactDOMServerStreaming-dev.modern.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ function checkAttributeStringCoercion(value, attributeName) {
283283
if (willCoercionThrow(value)) {
284284
error(
285285
"The provided `%s` attribute is an unsupported type %s." +
286-
" This value must be coerced to a string before before using it here.",
286+
" This value must be coerced to a string before using it here.",
287287
attributeName,
288288
typeName(value)
289289
);
@@ -297,7 +297,7 @@ function checkCSSPropertyStringCoercion(value, propName) {
297297
if (willCoercionThrow(value)) {
298298
error(
299299
"The provided `%s` CSS property is an unsupported type %s." +
300-
" This value must be coerced to a string before before using it here.",
300+
" This value must be coerced to a string before using it here.",
301301
propName,
302302
typeName(value)
303303
);
@@ -311,7 +311,7 @@ function checkHtmlStringCoercion(value) {
311311
if (willCoercionThrow(value)) {
312312
error(
313313
"The provided HTML markup uses a value of unsupported type %s." +
314-
" This value must be coerced to a string before before using it here.",
314+
" This value must be coerced to a string before using it here.",
315315
typeName(value)
316316
);
317317

compiled/facebook-www/ReactDOMTesting-dev.classic.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2765,7 +2765,7 @@ function checkAttributeStringCoercion(value, attributeName) {
27652765
if (willCoercionThrow(value)) {
27662766
error(
27672767
"The provided `%s` attribute is an unsupported type %s." +
2768-
" This value must be coerced to a string before before using it here.",
2768+
" This value must be coerced to a string before using it here.",
27692769
attributeName,
27702770
typeName(value)
27712771
);
@@ -2779,7 +2779,7 @@ function checkKeyStringCoercion(value) {
27792779
if (willCoercionThrow(value)) {
27802780
error(
27812781
"The provided key is an unsupported type %s." +
2782-
" This value must be coerced to a string before before using it here.",
2782+
" This value must be coerced to a string before using it here.",
27832783
typeName(value)
27842784
);
27852785

@@ -2792,7 +2792,7 @@ function checkPropStringCoercion(value, propName) {
27922792
if (willCoercionThrow(value)) {
27932793
error(
27942794
"The provided `%s` prop is an unsupported type %s." +
2795-
" This value must be coerced to a string before before using it here.",
2795+
" This value must be coerced to a string before using it here.",
27962796
propName,
27972797
typeName(value)
27982798
);
@@ -2806,7 +2806,7 @@ function checkCSSPropertyStringCoercion(value, propName) {
28062806
if (willCoercionThrow(value)) {
28072807
error(
28082808
"The provided `%s` CSS property is an unsupported type %s." +
2809-
" This value must be coerced to a string before before using it here.",
2809+
" This value must be coerced to a string before using it here.",
28102810
propName,
28112811
typeName(value)
28122812
);
@@ -2820,7 +2820,7 @@ function checkHtmlStringCoercion(value) {
28202820
if (willCoercionThrow(value)) {
28212821
error(
28222822
"The provided HTML markup uses a value of unsupported type %s." +
2823-
" This value must be coerced to a string before before using it here.",
2823+
" This value must be coerced to a string before using it here.",
28242824
typeName(value)
28252825
);
28262826

@@ -2834,7 +2834,7 @@ function checkFormFieldValueStringCoercion(value) {
28342834
error(
28352835
"Form field values (value, checked, defaultValue, or defaultChecked props)" +
28362836
" must be strings, not %s." +
2837-
" This value must be coerced to a string before before using it here.",
2837+
" This value must be coerced to a string before using it here.",
28382838
typeName(value)
28392839
);
28402840

@@ -34688,7 +34688,7 @@ function createFiberRoot(
3468834688
return root;
3468934689
}
3469034690

34691-
var ReactVersion = "18.3.0-www-classic-be3ff502";
34691+
var ReactVersion = "18.3.0-www-classic-ef12d11d";
3469234692

3469334693
function createPortal$1(
3469434694
children,

0 commit comments

Comments
 (0)