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 | ||
blob | ||
ci | ||
commit | ||
extensions | ||
graphs | ||
lib | ||
network | ||
u2f | ||
users | ||
activities.js.coffee | ||
admin.js.coffee | ||
api.js.coffee | ||
application.js.coffee | ||
aside.js.coffee | ||
autosave.js.coffee | ||
awards_handler.coffee | ||
breakpoints.coffee | ||
broadcast_message.js.coffee | ||
build_artifacts.js.coffee | ||
commit.js.coffee | ||
commits.js.coffee | ||
compare.js.coffee | ||
confirm_danger_modal.js.coffee | ||
copy_to_clipboard.js.coffee | ||
diff.js.coffee | ||
dispatcher.js.coffee | ||
dropzone_input.js.coffee | ||
due_date_select.js.coffee | ||
flash.js.coffee | ||
gfm_auto_complete.js.coffee | ||
gl_crop.js.coffee | ||
gl_dropdown.js.coffee | ||
gl_form.js.coffee | ||
group_avatar.js.coffee | ||
groups.js.coffee | ||
groups_select.js.coffee | ||
importer_status.js.coffee | ||
issuable.js.coffee | ||
issuable_context.js.coffee | ||
issuable_form.js.coffee | ||
issue.js.coffee | ||
issue_status_select.js.coffee | ||
issues-bulk-assignment.js.coffee | ||
LabelManager.js.coffee | ||
labels.js.coffee | ||
labels_select.js.coffee | ||
layout_nav.js.coffee | ||
line_highlighter.js.coffee | ||
logo.js.coffee | ||
markdown_preview.js.coffee | ||
merge_request.js.coffee | ||
merge_request_tabs.js.coffee | ||
merge_request_widget.js.coffee | ||
merged_buttons.js.coffee | ||
milestone.js.coffee | ||
milestone_select.js.coffee | ||
namespace_select.js.coffee | ||
new_branch_form.js.coffee | ||
new_commit_form.js.coffee | ||
notes.js.coffee | ||
pager.js.coffee | ||
profile.js.coffee | ||
project.js.coffee | ||
project_avatar.js.coffee | ||
project_find_file.js.coffee | ||
project_fork.js.coffee | ||
project_import.js.coffee | ||
project_members.js.coffee | ||
project_new.js.coffee | ||
project_select.js.coffee | ||
project_show.js.coffee | ||
projects_list.js.coffee | ||
protected_branches.js.coffee | ||
right_sidebar.js.coffee | ||
search.js.coffee | ||
search_autocomplete.js.coffee | ||
shortcuts.js.coffee | ||
shortcuts_blob.coffee | ||
shortcuts_dashboard_navigation.js.coffee | ||
shortcuts_find_file.js.coffee | ||
shortcuts_issuable.coffee | ||
shortcuts_navigation.coffee | ||
shortcuts_network.js.coffee | ||
sidebar.js.coffee | ||
star.js.coffee | ||
subscription.js.coffee | ||
syntax_highlight.coffee | ||
todos.js.coffee | ||
tree.js.coffee | ||
user.js.coffee | ||
user_tabs.js.coffee | ||
users_select.js.coffee | ||
wikis.js.coffee | ||
zen_mode.js.coffee |