@airpower/transformer 0.1.11 → 0.1.13

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.
Files changed (2) hide show
  1. package/dist/main.js +4 -5
  2. package/package.json +1 -1
package/dist/main.js CHANGED
@@ -223,19 +223,18 @@ class DecoratorUtil {
223
223
  */
224
224
  static getClassConfig(Class, classConfigKey, isObject = false) {
225
225
  let classConfig = Reflect.get(new Class(), classConfigKey);
226
+ const SuperClass = Reflect.getPrototypeOf(Class);
226
227
  if (!isObject) {
227
228
  if (classConfig) {
228
229
  return classConfig;
229
230
  }
230
- const SuperClass2 = Reflect.getPrototypeOf(Class);
231
- if (!SuperClass2 || SuperClass2.prototype.constructor.name === Transformer.name) {
231
+ if (!SuperClass || SuperClass.prototype.constructor.name === Transformer.name) {
232
232
  return void 0;
233
233
  }
234
- return this.getClassConfig(SuperClass2, classConfigKey);
234
+ return this.getClassConfig(SuperClass, classConfigKey);
235
235
  }
236
236
  classConfig = classConfig || {};
237
- const SuperClass = Reflect.getPrototypeOf(Class);
238
- if (!SuperClass || SuperClass.constructor.name === Transformer.name) {
237
+ if (!SuperClass || SuperClass.prototype.constructor.name === Transformer.name) {
239
238
  return classConfig;
240
239
  }
241
240
  return {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@airpower/transformer",
3
3
  "type": "module",
4
- "version": "0.1.11",
4
+ "version": "0.1.13",
5
5
  "description": "AirPower-Transformer 是一个基于 TypeScript 的数据转换器,提供了从 JSON 对象到 类实例 对象之间互相转换的系列装饰器和方法。",
6
6
  "author": {
7
7
  "name": "Hamm",