-
-
Notifications
You must be signed in to change notification settings - Fork 26.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed process type in TypeScript template. #7796
Conversation
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need the corporate CLA signed. If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks! |
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks! |
Hi @fuszenecker, was this causing you an error? I'm not a huge fan of this approach, as it's confusing for people... if this is an error, please let me know. It would be better to use the globals file for this, I feel. |
@@ -29,7 +29,7 @@ export function register(config?: Config) { | |||
if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) { | |||
// The URL constructor is available in all browsers that support SW. | |||
const publicUrl = new URL( | |||
(process as { env: { [key: string]: string } }).env.PUBLIC_URL, | |||
process.env.PUBLIC_URL, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The exact type of process
is known, just as in line 29.
Sorry, that makes 100% sense @fuszenecker - I was reviewing from my phone and somehow thought this change was the opposite. |
Hi,
Please run the following commands in order to test my changes:
Expected result: no more compilation error appears.