@fastcar/core 0.2.56 → 0.2.57

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fastcar/core",
3
- "version": "0.2.56",
3
+ "version": "0.2.57",
4
4
  "homepage": "https://github.com/williamDazhangyu/fast-car",
5
5
  "main": "target/index.js",
6
6
  "author": "william_zhong",
@@ -10,7 +10,7 @@ export default function Log(category?: string) {
10
10
  Reflect.defineProperty(target, propertyKey, {
11
11
  get: (): Logger => {
12
12
  let app: ApplicationInterface = Reflect.get(global, CommonConstant.FastcarApp);
13
- let appid = app.getSetting(CommonConstant.APPId) || ""; //进行差异化区分
13
+ let appid = app?.getSetting(CommonConstant.APPId) || ""; //进行差异化区分
14
14
  return app ? app.getLogger(appid ? `${appid}.${m}` : m) : console;
15
15
  },
16
16
  });
@@ -8,7 +8,7 @@ function Log(category) {
8
8
  Reflect.defineProperty(target, propertyKey, {
9
9
  get: () => {
10
10
  let app = Reflect.get(global, CommonConstant_1.CommonConstant.FastcarApp);
11
- let appid = app.getSetting(CommonConstant_1.CommonConstant.APPId) || ""; //进行差异化区分
11
+ let appid = app?.getSetting(CommonConstant_1.CommonConstant.APPId) || ""; //进行差异化区分
12
12
  return app ? app.getLogger(appid ? `${appid}.${m}` : m) : console;
13
13
  },
14
14
  });