esrap 1.0.1 → 1.0.2
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.
- package/package.json +1 -1
- package/src/handlers.js +2 -0
package/package.json
CHANGED
package/src/handlers.js
CHANGED
|
@@ -408,6 +408,8 @@ const shared = {
|
|
|
408
408
|
* @param {import('./types').State} state
|
|
409
409
|
*/
|
|
410
410
|
'BlockStatement|ClassBody': (node, state) => {
|
|
411
|
+
if (node.body.length === 0) return [c('{}')];
|
|
412
|
+
|
|
411
413
|
return [
|
|
412
414
|
c(`{\n${state.indent}\t`),
|
|
413
415
|
...handle_body(node.body, { ...state, indent: state.indent + '\t' }),
|