1
0
Fork 0
mirror of https://github.com/terribleplan/next.js.git synced 2024-01-19 02:48:18 +00:00
This commit is contained in:
Guillermo Rauch 2017-02-25 19:41:17 -08:00
parent bb526fdf53
commit 1417f3040b

View file

@ -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 } = {}) {