[arvados-workbench2] created: 2.5.0-70-ga2442ad0

git repository hosting git at public.arvados.org
Mon Feb 27 17:13:05 UTC 2023


        at  a2442ad07740434e1862c22fcbd1e9fd729ed401 (commit)


commit a2442ad07740434e1862c22fcbd1e9fd729ed401
Author: Stephen Smith <stephen at curii.com>
Date:   Mon Feb 27 12:12:23 2023 -0500

    19930: Check if richtext project description contains text to omit saving empty html tags
    
    Arvados-DCO-1.1-Signed-off-by: Stephen Smith <stephen at curii.com>

diff --git a/src/components/text-field/text-field.tsx b/src/components/text-field/text-field.tsx
index 78e2c7fb..b2a8dd48 100644
--- a/src/components/text-field/text-field.tsx
+++ b/src/components/text-field/text-field.tsx
@@ -72,7 +72,11 @@ export const RichEditorTextField = withStyles(styles)(
 
         onChange = (value: any) => {
             this.setState({ value });
-            this.props.input.onChange(value.toString('html'));
+            this.props.input.onChange(
+                !!value.getEditorState().getCurrentContent().getPlainText().trim()
+                ? value.toString('html')
+                : null
+            );
         }
 
         render() {

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list