butternut icon indicating copy to clipboard operation
butternut copied to clipboard

preserve parens around async destructuring arrow functions (fixes #170)

Open anilanar opened this issue 8 years ago • 0 comments

Explanation for this edge case: left parens is part of an arrow function expression unless it is async. Thus instead of comparing this.params[0].start, c and this.start with each other to figure out start/end indices of removal, it makes more sense to overwrite everything between c and this.params[0].start with (.

anilanar avatar Jun 08 '17 23:06 anilanar