Fix process type in TypeScript template (#7796)

This commit is contained in:
Robert FUSZENECKER
2019-10-10 08:25:14 +02:00
committed by Brody McKee
parent 09cbb89d44
commit 9161ba83d7

View File

@@ -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,
window.location.href
);
if (publicUrl.origin !== window.location.origin) {