fix($core): window is not defined

This commit is contained in:
ULIVZ
2019-06-04 03:34:54 +08:00
parent 409bf14ad3
commit d30e078b3c
+1 -1
View File
@@ -190,7 +190,7 @@ export function normalizeConfig (component, rawConfig) {
* @param {any} value
*/
export function setGlobalInfo (key, value) {
if (!window.__VUEPRESS__ || typeof window === 'undefined') {
if (typeof window === 'undefined' || !window.__VUEPRESS__) {
return
}
window.__VUEPRESS__[key] = value