Merge branch 'master' into invalid-source-map-option

This commit is contained in:
kyle
2017-12-06 19:52:52 -08:00
committed by GitHub
3 changed files with 8 additions and 4 deletions

View File

@@ -3,11 +3,12 @@ import deepExtend from "deep-extend"
import System from "core/system" import System from "core/system"
import win from "core/window" import win from "core/window"
import ApisPreset from "core/presets/apis" import ApisPreset from "core/presets/apis"
import * as AllPlugins from "core/plugins/all" import * as AllPlugins from "core/plugins/all"
import { parseSearch } from "core/utils" import { parseSearch } from "core/utils"
if (process.env.NODE_ENV !== "production") { if (process.env.NODE_ENV !== "production" && typeof window !== "undefined") {
window.Perf = require("react-addons-perf") win.Perf = require("react-addons-perf")
} }
// eslint-disable-next-line no-undef // eslint-disable-next-line no-undef

View File

@@ -607,7 +607,10 @@ export const getSampleSchema = (schema, contentType="", config={}) => {
export const parseSearch = () => { export const parseSearch = () => {
let map = {} let map = {}
let search = window.location.search let search = win.location.search
if(!search)
return {}
if ( search != "" ) { if ( search != "" ) {
let params = search.substr(1).split("&") let params = search.substr(1).split("&")

View File

@@ -1,6 +1,6 @@
// Promise global, Used ( at least ) by 'whatwg-fetch'. And required by IE 11 // Promise global, Used ( at least ) by 'whatwg-fetch'. And required by IE 11
if(!window.Promise) { if(typeof Promise === "undefined") {
require("core-js/fn/promise") require("core-js/fn/promise")
} }