Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix .forEach is not a function #219

Merged
merged 1 commit into from
Nov 11, 2019
Merged

Fix .forEach is not a function #219

merged 1 commit into from
Nov 11, 2019

Conversation

mahnuh
Copy link

@mahnuh mahnuh commented Nov 11, 2019

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Documentation changes
  • Other... Please describe:

PR Checklist

For bug fixes / features, please check if your PR fulfills the following requirements:

  • Testing has been carried out for the changes have been added
  • Regression testing has been carried out for existing functionality
  • Docs have been added / updated

What is the purpose of this PR?

As described in #217 the after_prepare script hangs with error .forEach is not a function. This happens either if there is only one plugin configuration in the config.xml or if a plugin configuration only has one variable. This is due to config.widget.plugin or plugin.variable not being arrays in this cases. This PR makes sure that both always are arrays.

Does this PR introduce a breaking change?

  • Yes
  • No

What testing has been done on the changes in the PR?

Tested with different config.xml scenarios.

What testing has been done on existing functionality?

Tested with different config.xml scenarios.

Other information

The open PR #213 (which I discovered just now before submitting mine) does not fix both cases.

@ghost
Copy link

ghost commented Nov 11, 2019

DeepCode Report (#e44463)

DeepCode analyzed this pull request.
There are no new issues.

@dpa99c
Copy link
Owner

dpa99c commented Nov 11, 2019

Thanks, checked the logic and this makes sense.

@dpa99c dpa99c added the ready for release Something has been implemented and is awaiting release to npm label Nov 11, 2019
@dpa99c dpa99c removed the ready for release Something has been implemented and is awaiting release to npm label Feb 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants