mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
https in reactProdInvariant text (#12869)
This commit is contained in:
@@ -39,7 +39,7 @@ describe('reactProdInvariant', () => {
|
||||
reactProdInvariant(124, 'foo', 'bar');
|
||||
}).toThrowError(
|
||||
'Minified React error #124; visit ' +
|
||||
'http://reactjs.org/docs/error-decoder.html?invariant=124&args[]=foo&args[]=bar' +
|
||||
'https://reactjs.org/docs/error-decoder.html?invariant=124&args[]=foo&args[]=bar' +
|
||||
' for the full message or use the non-minified dev environment' +
|
||||
' for full errors and additional helpful warnings.',
|
||||
);
|
||||
@@ -48,7 +48,7 @@ describe('reactProdInvariant', () => {
|
||||
reactProdInvariant(20);
|
||||
}).toThrowError(
|
||||
'Minified React error #20; visit ' +
|
||||
'http://reactjs.org/docs/error-decoder.html?invariant=20' +
|
||||
'https://reactjs.org/docs/error-decoder.html?invariant=20' +
|
||||
' for the full message or use the non-minified dev environment' +
|
||||
' for full errors and additional helpful warnings.',
|
||||
);
|
||||
@@ -57,7 +57,7 @@ describe('reactProdInvariant', () => {
|
||||
reactProdInvariant(77, '<div>', '&?bar');
|
||||
}).toThrowError(
|
||||
'Minified React error #77; visit ' +
|
||||
'http://reactjs.org/docs/error-decoder.html?invariant=77&args[]=%3Cdiv%3E&args[]=%26%3Fbar' +
|
||||
'https://reactjs.org/docs/error-decoder.html?invariant=77&args[]=%3Cdiv%3E&args[]=%26%3Fbar' +
|
||||
' for the full message or use the non-minified dev environment' +
|
||||
' for full errors and additional helpful warnings.',
|
||||
);
|
||||
|
||||
@@ -19,7 +19,7 @@ import invariant from 'fbjs/lib/invariant';
|
||||
*/
|
||||
function reactProdInvariant(code: string): void {
|
||||
const argCount = arguments.length - 1;
|
||||
let url = 'http://reactjs.org/docs/error-decoder.html?invariant=' + code;
|
||||
let url = 'https://reactjs.org/docs/error-decoder.html?invariant=' + code;
|
||||
for (let argIdx = 0; argIdx < argCount; argIdx++) {
|
||||
url += '&args[]=' + encodeURIComponent(arguments[argIdx + 1]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user