Skip to content

Commit

Permalink
Simplify applyClassDecs
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolo-ribaudo committed Mar 18, 2022
1 parent e80c518 commit a91a39c
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions packages/babel-helpers/src/helpers/applyDecs.js
Expand Up @@ -626,17 +626,11 @@ function applyClassDecs(ret, targetClass, metadataMap, classDecs) {
}
}

ret.push(newClass);

if (initializers.length > 0) {
ret.push(function () {
for (var i = 0; i < initializers.length; i++) {
initializers[i].call(newClass);
}
});
} else {
ret.push(function () {});
}
ret.push(newClass, function () {
for (var i = 0; i < initializers.length; i++) {
initializers[i].call(newClass);
}
});
}
}

Expand Down

0 comments on commit a91a39c

Please sign in to comment.