File template list not cleared when switching template type in web ide

Summary

When I select one file template type (e.g., license) in the web ide and then I select a different one (e.g., Dockerfile) the new list of templates is added to the end of the existing list rather than replacing it.

Steps to reproduce

  1. In the Web IDE add a new file and select the LICENSE template.
  2. Select Dockerfile in the first dropdown

What is the current bug behavior?

It lists licenses and dockerfiles. An error is reported if I select a license.

templates_list

What is the expected correct behavior?

Only the list of Dockerfile templates (i.e., no licenses)

Output of checks

This bug happens on GitLab.com

Links / references

https://gitlab.com/gitlab-org/gitlab-ce/issues/47947

/cc @jramsay @iamphill

Assignee Loading
Time tracking Loading