The MergeRequest JS class should have sane defaults for its @opts attribute
As reported in !2835 (closed), we're doing a check on @opts.action
in MergeRequest#initTabs
: if @opts.action != 'new'
but @opts
is not initialized to {}
when not given. That results in a JS exception that is caught and swallowed by jQuery in the case of an AJAX call.
The solution is to make @opts
default to {}
: constructor: (@opts = {}) ->