diff options
author | Filipa Lacerda <filipa@gitlab.com> | 2016-11-16 19:28:02 +0300 |
---|---|---|
committer | Filipa Lacerda <filipa@gitlab.com> | 2016-11-16 19:28:02 +0300 |
commit | ba2e7deea4a9a164fb5e3b7d4f30fbbe464ad8e9 (patch) | |
tree | d68d15c565aa687269c82631ce6cd4c0435b9924 /app/assets/javascripts | |
parent | 4f0a169810621bfb15304b30d0a9916625cf4547 (diff) |
Fixes broken tests
Diffstat (limited to 'app/assets/javascripts')
-rw-r--r-- | app/assets/javascripts/environments/components/environment_actions.js.es6 | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/app/assets/javascripts/environments/components/environment_actions.js.es6 b/app/assets/javascripts/environments/components/environment_actions.js.es6 index db415bb20eb..1f5ae74dbb1 100644 --- a/app/assets/javascripts/environments/components/environment_actions.js.es6 +++ b/app/assets/javascripts/environments/components/environment_actions.js.es6 @@ -27,10 +27,13 @@ const dropdownContainer = this.$el.querySelector('.dropdown-play-icon-container'); const actionContainers = this.$el.querySelectorAll('.action-play-icon-container'); + // Phantomjs does not have support to iterate a nodelist. + const actionsArray = [].slice.call(actionContainers); - if (playIcon) { + if (playIcon && actionsArray && dropdownContainer) { dropdownContainer.appendChild(playIcon.cloneNode(true)); - actionContainers.forEach((element) => { + + actionsArray.forEach((element) => { element.appendChild(playIcon.cloneNode(true)); }); } |