From 74ef26144f663f29247c4cfd6d49ec090d59b31c Mon Sep 17 00:00:00 2001 From: Coung Ngo <cngo@gitlab.com> Date: Wed, 4 Aug 2021 11:49:43 +0000 Subject: [PATCH] Fix object prop default to empty object --- .../cycle_analytics/components/path_navigation.vue | 2 +- .../issue_show/components/fields/description_template.vue | 2 +- app/assets/javascripts/issue_show/components/form.vue | 2 +- .../paginated_table_with_search_and_tabs.vue | 4 ++-- .../devops_adoption/components/devops_adoption_section.vue | 2 +- .../productivity_analytics/components/metric_chart.vue | 2 +- .../components/drawer_sections/merged_by.vue | 2 +- .../escalation_policies/components/escalation_rule.vue | 2 +- .../related_items_tree/components/epic_health_status.vue | 2 +- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/app/assets/javascripts/cycle_analytics/components/path_navigation.vue b/app/assets/javascripts/cycle_analytics/components/path_navigation.vue index 47fafc3b90cee..5ae2e979308d2 100644 --- a/app/assets/javascripts/cycle_analytics/components/path_navigation.vue +++ b/app/assets/javascripts/cycle_analytics/components/path_navigation.vue @@ -34,7 +34,7 @@ export default { selectedStage: { type: Object, required: false, - default: () => {}, + default: () => ({}), }, withStageCounts: { type: Boolean, diff --git a/app/assets/javascripts/issue_show/components/fields/description_template.vue b/app/assets/javascripts/issue_show/components/fields/description_template.vue index 9bfdbb41e2373..35e7860cd9b5e 100644 --- a/app/assets/javascripts/issue_show/components/fields/description_template.vue +++ b/app/assets/javascripts/issue_show/components/fields/description_template.vue @@ -15,7 +15,7 @@ export default { issuableTemplates: { type: [Object, Array], required: false, - default: () => {}, + default: () => ({}), }, projectPath: { type: String, diff --git a/app/assets/javascripts/issue_show/components/form.vue b/app/assets/javascripts/issue_show/components/form.vue index bdaa8a4dd6bbc..001e8abb9411f 100644 --- a/app/assets/javascripts/issue_show/components/form.vue +++ b/app/assets/javascripts/issue_show/components/form.vue @@ -33,7 +33,7 @@ export default { issuableTemplates: { type: [Object, Array], required: false, - default: () => {}, + default: () => [], }, issuableType: { type: String, diff --git a/app/assets/javascripts/vue_shared/components/paginated_table_with_search_and_tabs/paginated_table_with_search_and_tabs.vue b/app/assets/javascripts/vue_shared/components/paginated_table_with_search_and_tabs/paginated_table_with_search_and_tabs.vue index 79a9e1fca8ced..8a67754993d99 100644 --- a/app/assets/javascripts/vue_shared/components/paginated_table_with_search_and_tabs/paginated_table_with_search_and_tabs.vue +++ b/app/assets/javascripts/vue_shared/components/paginated_table_with_search_and_tabs/paginated_table_with_search_and_tabs.vue @@ -42,12 +42,12 @@ export default { itemsCount: { type: Object, required: false, - default: () => {}, + default: () => ({}), }, pageInfo: { type: Object, required: false, - default: () => {}, + default: () => ({}), }, statusTabs: { type: Array, diff --git a/ee/app/assets/javascripts/analytics/devops_report/devops_adoption/components/devops_adoption_section.vue b/ee/app/assets/javascripts/analytics/devops_report/devops_adoption/components/devops_adoption_section.vue index f4b5ba52cc1c0..d54f6d11390b9 100644 --- a/ee/app/assets/javascripts/analytics/devops_report/devops_adoption/components/devops_adoption_section.vue +++ b/ee/app/assets/javascripts/analytics/devops_report/devops_adoption/components/devops_adoption_section.vue @@ -40,7 +40,7 @@ export default { enabledNamespaces: { type: Object, required: false, - default: () => {}, + default: () => ({}), }, groups: { type: Array, diff --git a/ee/app/assets/javascripts/analytics/productivity_analytics/components/metric_chart.vue b/ee/app/assets/javascripts/analytics/productivity_analytics/components/metric_chart.vue index 0c80e958a8c22..affea8d23bd89 100644 --- a/ee/app/assets/javascripts/analytics/productivity_analytics/components/metric_chart.vue +++ b/ee/app/assets/javascripts/analytics/productivity_analytics/components/metric_chart.vue @@ -47,7 +47,7 @@ export default { chartData: { type: [Object, Array], required: false, - default: () => {}, + default: () => [], }, }, computed: { diff --git a/ee/app/assets/javascripts/compliance_dashboard/components/drawer_sections/merged_by.vue b/ee/app/assets/javascripts/compliance_dashboard/components/drawer_sections/merged_by.vue index 566308cf44c03..5f01b68a5d951 100644 --- a/ee/app/assets/javascripts/compliance_dashboard/components/drawer_sections/merged_by.vue +++ b/ee/app/assets/javascripts/compliance_dashboard/components/drawer_sections/merged_by.vue @@ -16,7 +16,7 @@ export default { mergedBy: { type: Object, required: false, - default: () => {}, + default: () => ({}), }, }, computed: { diff --git a/ee/app/assets/javascripts/escalation_policies/components/escalation_rule.vue b/ee/app/assets/javascripts/escalation_policies/components/escalation_rule.vue index 75e30f7343909..b0f8e138697a9 100644 --- a/ee/app/assets/javascripts/escalation_policies/components/escalation_rule.vue +++ b/ee/app/assets/javascripts/escalation_policies/components/escalation_rule.vue @@ -70,7 +70,7 @@ export default { validationState: { type: Object, required: false, - default: () => {}, + default: () => ({}), }, }, data() { diff --git a/ee/app/assets/javascripts/related_items_tree/components/epic_health_status.vue b/ee/app/assets/javascripts/related_items_tree/components/epic_health_status.vue index 2576b31f070c4..b1b2b04f67be9 100644 --- a/ee/app/assets/javascripts/related_items_tree/components/epic_health_status.vue +++ b/ee/app/assets/javascripts/related_items_tree/components/epic_health_status.vue @@ -9,7 +9,7 @@ export default { healthStatus: { type: Object, required: true, - default: () => {}, + default: () => ({}), }, }, computed: { -- GitLab