7b18e8c744
Avoid a TypeError when initializing MergeRequest JS class with no arg ## What does this MR do? Avoid a TypeError when initializing MergeRequest JS class with no arg. ## Are there points in the code the reviewer needs to double check? No. ## Why was this MR needed? Without this sane default you would get the following error when you tried to instantiate a new MergeRequest object with no argument (i.e. `new MergeRequest();`): TypeError: undefined is not an object (evaluating 'this.opts.action') ## What are the relevant issue numbers? Fixes #13525. ## Does this MR meet the acceptance criteria? - [x] No CHANGELOG since it's a trivial internal change - [x] Tests - [x] Added for this feature/bug - [ ] All builds are passing - [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides) - [x] Branch has no merge conflicts with `master` (if you do - rebase it please) - [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) See merge request !4667 |
||
---|---|---|
.. | ||
behaviors | ||
extensions | ||
fixtures | ||
graphs | ||
u2f | ||
application_spec.js.coffee | ||
awards_handler_spec.js.coffee | ||
issue_spec.js.coffee | ||
line_highlighter_spec.js.coffee | ||
merge_request_spec.js.coffee | ||
merge_request_tabs_spec.js.coffee | ||
merge_request_widget_spec.js.coffee | ||
new_branch_spec.js.coffee | ||
notes_spec.js.coffee | ||
project_title_spec.js.coffee | ||
right_sidebar_spec.js.coffee | ||
search_autocomplete_spec.js.coffee | ||
shortcuts_issuable_spec.js.coffee | ||
spec_helper.coffee | ||
syntax_highlight_spec.js.coffee | ||
zen_mode_spec.js.coffee |