Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 65e3d1b

Browse files
author
markteng
committed
perf: remove duplicate logic
1 parent 3ef0422 commit 65e3d1b

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

packages/next/client/index.tsx

+2-4
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ import PageLoader, { looseToArray, StyleSheetTuple } from './page-loader'
2121
import measureWebVitals from './performance-relayer'
2222
import { createRouter, makePublicRouterInstance } from './router'
2323

24+
require('next/dist/build/polyfills/finally-polyfill.min')
25+
2426
/// <reference types="react-dom/experimental" />
2527

2628
declare let __webpack_public_path__: string
@@ -41,10 +43,6 @@ declare global {
4143
type RenderRouteInfo = PrivateRouteInfo & { App: AppComponent }
4244
type RenderErrorProps = Omit<RenderRouteInfo, 'Component' | 'styleSheets'>
4345

44-
if (!('finally' in Promise.prototype)) {
45-
require('next/dist/build/polyfills/finally-polyfill.min')
46-
}
47-
4846
const data: typeof window['__NEXT_DATA__'] = JSON.parse(
4947
document.getElementById('__NEXT_DATA__')!.textContent!
5048
)

0 commit comments

Comments
 (0)