diff --git a/src/core/5.inject.js b/src/core/5.inject.js index fe4f5133e..9e0ae8503 100644 --- a/src/core/5.inject.js +++ b/src/core/5.inject.js @@ -81,10 +81,10 @@ BI.service = BI.service || function (xtype, cls) { if (serviceInjection[xtype] != null) { _global.console && console.error("service: [" + xtype + "] 已经注册过了"); - } else { - serviceInjection[xtype] = cls; } + serviceInjection[xtype] = cls; + return function (config) { return BI.Services.getService(xtype, config); };