mirror of
https://github.com/terribleplan/next.js.git
synced 2024-01-19 02:48:18 +00:00
ponify (#1278)
This commit is contained in:
parent
bb526fdf53
commit
1417f3040b
|
@ -1,5 +1,3 @@
|
|||
/* global fetch */
|
||||
|
||||
import { parse, format } from 'url'
|
||||
import { EventEmitter } from 'events'
|
||||
import evalScript from '../eval-script'
|
||||
|
@ -7,11 +5,7 @@ import shallowEquals from '../shallow-equals'
|
|||
import PQueue from '../p-queue'
|
||||
import { loadGetInitialProps, getLocationOrigin } from '../utils'
|
||||
import { _notifyBuildIdMismatch } from './'
|
||||
|
||||
// Add "fetch" polyfill for older browsers
|
||||
if (typeof window !== 'undefined') {
|
||||
require('unfetch/polyfill')
|
||||
}
|
||||
import fetch from 'unfetch'
|
||||
|
||||
export default class Router extends EventEmitter {
|
||||
constructor (pathname, query, { Component, ErrorComponent, err } = {}) {
|
||||
|
|
Loading…
Reference in a new issue