From ae8b968b5151c36a02bab4a5b01cb76760c2137b Mon Sep 17 00:00:00 2001 From: dailer Date: Fri, 30 Jul 2021 10:27:35 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=A0JIRA=E4=BB=BB=E5=8A=A1=20fix:=20?= =?UTF-8?q?=E5=85=BC=E5=AE=B9constant=E5=AE=9A=E4=B9=89=E4=B8=BA0=E7=9A=84?= =?UTF-8?q?=E5=9C=BA=E6=99=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 离谱,居然有人定义constant为0. model,service,provider之类的不处理了.指定是对象 --- src/core/6.inject.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core/6.inject.js b/src/core/6.inject.js index 174a62422..e3abaa51a 100644 --- a/src/core/6.inject.js +++ b/src/core/6.inject.js @@ -126,7 +126,7 @@ } } if (findVersion === true) { - _global.console && console.error("moduleId: [" + module.moduleId + "] 接口: [" + type + "] 接口版本: [" + version + "] 已过期,版本要求为:", dependencies[module.moduleId], "=>", moduleInjection[module.moduleId]); + _global.console && console.error("moduleId: [" + module.moduleId + "] 接口: [" + type + "] 接口版本: [" + version + "] 已过期,版本要求为:", dependencies[module.moduleId], "=>", moduleInjection[module.moduleId]); continue; } } @@ -212,7 +212,7 @@ BI.Constants = BI.Constants || { getConstant: function (type) { - if (!constantInjection[type]) { + if (BI.isNull(constantInjection[type])) { _global.console && console.error("constant: [" + type + "] 未定义"); } return constantInjection[type]; @@ -346,7 +346,7 @@ }; BI.getResource = BI.getResource || function (type, config) { - if (constantInjection[type]) { + if (BI.isNotNull(constantInjection[type])) { return BI.Constants.getConstant(type); } if (modelInjection[type]) {