ts-morph icon indicating copy to clipboard operation
ts-morph copied to clipboard

fix: fix manipulation of JsxSelfClosingElement

Open odiak opened this issue 2 years ago • 1 comments

While I investigating #1409, I found suspicious code from stack trace. Because it works as expected after fixing there, I made this pull request.

odiak avatar May 10 '23 07:05 odiak

I also found some similar code pieces, though I'm not sure if they cause error.

https://github.com/dsherret/ts-morph/blob/c12673319f919a4386685c63d31356cd2c1a981c/packages/ts-morph/src/manipulation/nodeHandlers/RangeParentHandler.ts#L89-L90

https://github.com/dsherret/ts-morph/blob/c12673319f919a4386685c63d31356cd2c1a981c/packages/ts-morph/src/manipulation/nodeHandlers/DefaultParentHandler.ts#L64-L65

https://github.com/dsherret/ts-morph/blob/c12673319f919a4386685c63d31356cd2c1a981c/packages/ts-morph/src/manipulation/nodeHandlers/UnwrapParentHandler.ts#L50-L51

odiak avatar May 10 '23 08:05 odiak