Skip to content

ShortcutsNavigation is initialized twice

On projects/show page, shortcuts_navigation.js gets loaded twice: once by pages/projects/index.js and once by pages/projects/show/index.js

This means any event listeners can be added multiple times, as unbinding events from this won't work (referring to different instance)

i.e.

// `bindEvents` called from constructor
$('.js-shortcuts-modal-trigger')
  .off('click', this.onToggleHelp);
  .on('click', this.onToggleHelp);