seer-dynamic-component
Advanced tools
Comparing version 1.6.8 to 1.6.9
@@ -185,5 +185,5 @@ import "core-js/modules/es6.object.keys.js"; | ||
origin = window._YMSHOST_; | ||
} else if (window.parent._YMSHOST_) { | ||
} else if (window.parent && window.parent._YMSHOST_) { | ||
origin = window.parent._YMSHOST_; | ||
} else if (window.opener._YMSHOST_) { | ||
} else if (window.opener && window.opener._YMSHOST_) { | ||
origin = window.opener._YMSHOST_; | ||
@@ -239,3 +239,3 @@ } | ||
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(_ref2) { | ||
var groupCode, tenantid, langApi, lang, packJs, callback, includeFw, diworkContext, userInfo, locale, initPackLangJson, initResponse, jsonLocale, langInit; | ||
var groupCode, tenantid, langApi, lang, packJs, callback, includeFw, diworkContext, userInfo, locale, langInit, initResponse, initPackLangJson, jsonLocale; | ||
return _regeneratorRuntime.wrap(function _callee2$(_context2) { | ||
@@ -303,7 +303,7 @@ while (1) switch (_context2.prev = _context2.next) { | ||
locale = getLocale("locale"); | ||
if (inDiwork()) { | ||
_context2.next = 47; | ||
if (!(!inDiwork() && groupCode && locale)) { | ||
_context2.next = 44; | ||
break; | ||
} | ||
initPackLangJson = {}; | ||
langInit = {}; | ||
_context2.prev = 30; | ||
@@ -315,3 +315,5 @@ _context2.next = 33; | ||
if (initResponse.body && initResponse.statusCode === 200) { | ||
initPackLangJson = JSON.parse(initResponse.body); | ||
initPackLangJson = JSON.parse(initResponse.body) || {}; | ||
jsonLocale = locale.toLowerCase().replace(/_/, ''); | ||
langInit[jsonLocale] = initPackLangJson; | ||
} | ||
@@ -325,10 +327,7 @@ _context2.next = 40; | ||
case 40: | ||
jsonLocale = locale.toLowerCase().replace(/_/, ''); | ||
langInit = {}; | ||
langInit[jsonLocale] = initPackLangJson; | ||
lang.init(langInit); | ||
callback && callback(); | ||
_context2.next = 50; | ||
_context2.next = 47; | ||
break; | ||
case 47: | ||
case 44: | ||
langApi = langApi || getLangOrign() + "/iuap-apcom-i18n"; | ||
@@ -339,3 +338,3 @@ lang.init(packJs || {}); | ||
}, 'YS', includeFw); | ||
case 50: | ||
case 47: | ||
//把已经加载过的多语模块存入全局变量中 | ||
@@ -348,3 +347,3 @@ window.seerConfig = window.seerConfig || {}; | ||
return _context2.abrupt("return", true); | ||
case 54: | ||
case 51: | ||
case "end": | ||
@@ -351,0 +350,0 @@ return _context2.stop(); |
{ | ||
"name": "seer-dynamic-component", | ||
"version": "1.6.8", | ||
"version": "1.6.9", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
23716
563