[ARVADOS-WORKBENCH2] updated: 1.4.1-263-gc7d5dec8

Git user git at public.arvados.org
Tue Feb 4 18:19:15 UTC 2020


Summary of changes:
 src/components/warning/warning.tsx | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

       via  c7d5dec8425d970c41a81c6328b91665acec1ec0 (commit)
      from  3d93769b1906fd43bade1c053429541877a75cc9 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit c7d5dec8425d970c41a81c6328b91665acec1ec0
Author: Peter Amstutz <peter.amstutz at curii.com>
Date:   Tue Feb 4 13:18:45 2020 -0500

    Don't crash if name is null or undefined
    
    no issue #
    
    Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <peter.amstutz at curii.com>

diff --git a/src/components/warning/warning.tsx b/src/components/warning/warning.tsx
index bd330361..95e495d7 100644
--- a/src/components/warning/warning.tsx
+++ b/src/components/warning/warning.tsx
@@ -16,11 +16,12 @@ interface WarningComponentProps {
 }
 
 export const WarningComponent = ({ text, rules, message }: WarningComponentProps) =>
-    rules.find(aRule => text.match(aRule) !== null)
-        ? message
-            ? <Tooltip title={message}><ErrorIcon /></Tooltip>
-            : <ErrorIcon />
-        : null;
+    !text ? <Tooltip title={"No name"}><ErrorIcon /></Tooltip>
+        : (rules.find(aRule => text.match(aRule) !== null)
+            ? message
+                ? <Tooltip title={message}><ErrorIcon /></Tooltip>
+                : <ErrorIcon />
+            : null);
 
 interface IllegalNamingWarningProps {
     name: string;

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list