From 678ec726800e501f02815d616308f217a264caac Mon Sep 17 00:00:00 2001 From: Scott Kiener Date: Thu, 16 Jun 2022 10:00:21 -0400 Subject: [PATCH] CSR-652 | Change validation location --- src/ux-components/alert/alert.vue | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/ux-components/alert/alert.vue b/src/ux-components/alert/alert.vue index d7cca79ad..8462e4436 100644 --- a/src/ux-components/alert/alert.vue +++ b/src/ux-components/alert/alert.vue @@ -56,7 +56,12 @@ export default { alertClass: String, cmsWidgetName: { type: String, - required: true, + default(rawProps) { + if (!rawProps.cmsWidgetName) { + console.log('Error: Missing a CMS Widget Name (required field)'); + } + return 'widgetUndefined'; + }, }, manualHeadline: String, manualCopy: String, @@ -99,9 +104,6 @@ export default { }, }, mounted() { - if (!this.cmsWidgetName) { - console.log('Error: Missing a CMS Widget Name (required field)'); - } this.ensureAlertIsInViewPort(); } };