esrap 1.4.7 → 1.4.8

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/handlers.js +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "esrap",
3
- "version": "1.4.7",
3
+ "version": "1.4.8",
4
4
  "description": "Parse in reverse",
5
5
  "repository": {
6
6
  "type": "git",
package/src/handlers.js CHANGED
@@ -1165,7 +1165,7 @@ const handlers = {
1165
1165
 
1166
1166
  state.commands.push(' from ');
1167
1167
  handle(node.source, state);
1168
- if (node.attributes) {
1168
+ if (node.attributes && node.attributes.length > 0) {
1169
1169
  state.commands.push(' with { ');
1170
1170
  for (let index = 0; index < node.attributes.length; index++) {
1171
1171
  const { key, value } = node.attributes[index];