[Bug]: `issueFeatureUpdates` is not iterable
rafaeelaudibert opened this issue · comments
Rafael Baldasso Audibert commented
Bug Description
When trying to promote a changelog which would generate an empty issueFeatureUpdates
, an error is raised.
This is the changelog
zapier:promote TypeError: issueFeatureUpdates is not iterable
zapier:promote at PromoteCommand.perform (/home/rafael/.nvm/versions/node/v16.14.0/lib/node_modules/zapier-platform-cli/src/oclif/commands/promote.js:99:46)
zapier:promote at async Promise.all (index 1)
zapier:promote at async PromoteCommand._run (/home/rafael/.nvm/versions/node/v16.14.0/lib/node_modules/zapier-platform-cli/node_modules/@oclif/command/lib/command.js:43:20)
zapier:promote at async Config.runCommand (/home/rafael/.nvm/versions/node/v16.14.0/lib/node_modules/zapier-platform-cli/node_modules/@oclif/config/lib/config.js:173:24)
zapier:promote at async Main.run (/home/rafael/.nvm/versions/node/v16.14.0/lib/node_modules/zapier-platform-cli/node_modules/@oclif/command/lib/main.js:28:9)
zapier:promote at async Main._run (/home/rafael/.nvm/versions/node/v16.14.0/lib/node_modules/zapier-platform-cli/node_modules/@oclif/command/lib/command.js:43:20) +431ms
› Error: issueFeatureUpdates is not iterable
This is happening because the code is trying to spread undefined
. Although this works for objects (i.e. {...undefined}
is valid), it doesn't work for arrays (i.e. [...undefined]
is invalid)
Reproduction Steps
Have a changelog with the following text:
## 1.10.1
1. Improve performance for trigger/my_trigger_1
2. Improve performance for trigger/my_trigger_2
Try promoting it, it'll fail
Zapier Platform version
15.0.1
Node.js version
16.14.0
Your Operating System
No response
npm/yarn version
No response
App ID
No response
More Details
No response
Raúl Negrón commented
Hello @rafaeelaudibert, thank you for your bug report!
We are actively working on a solution for this over at #690. So a fix is coming soon!