Skip to content

Commit 6926ab7

Browse files
authoredAug 30, 2020
1 parent f17d435 commit 6926ab7

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
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-
;(Promise.prototype as PromiseConstructor['prototype']).finally = 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
)

‎packages/next/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@
181181
"escape-string-regexp": "2.0.0",
182182
"etag": "1.8.1",
183183
"file-loader": "6.0.0",
184-
"finally-polyfill": "0.1.0",
184+
"finally-polyfill": "0.2.0",
185185
"find-up": "4.1.0",
186186
"fresh": "0.5.2",
187187
"gzip-size": "5.1.1",

0 commit comments

Comments
 (0)
Please sign in to comment.