Skip to content

Commit

Permalink
Update packages/babel-generator/src/node/whitespace.ts
Browse files Browse the repository at this point in the history
Co-authored-by: Nicol貌 Ribaudo <nicolo.ribaudo@gmail.com>
  • Loading branch information
liuxingbaoyu and nicolo-ribaudo committed Jul 8, 2022
1 parent 17e04f9 commit b1ff8bc
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions packages/babel-generator/src/node/whitespace.ts
Expand Up @@ -301,8 +301,7 @@ export const list: NodeHandlers<t.Node[]> = {
[type as string]
.concat(FLIPPED_ALIAS_KEYS[type] || [])
.forEach(function (type) {
nodes[type] = function (ret: number) {
return ret;
}.bind(null, amounts ? WhitespaceFlag.before | WhitespaceFlag.after : 0);
const ret = amounts ? WhitespaceFlag.before | WhitespaceFlag.after : 0;
nodes[type] = () => ret;
});
});

0 comments on commit b1ff8bc

Please sign in to comment.