diff --git a/src/components/widget-creator.jsx b/src/components/widget-creator.jsx index e6bb9a669..18b43c6d4 100644 --- a/src/components/widget-creator.jsx +++ b/src/components/widget-creator.jsx @@ -384,6 +384,17 @@ const WidgetCreator = ({instId, widgetId, minHeight='', minWidth=''}) => { } const save = (instanceName, qset, version = 1) => { + //cancel saving of the widget if title is too long to prevent crashing + if(instanceName.length>100) { + setAlertDialog({ + enabled: true, + title: 'Title too long', //the max length for title in my testing is 100 + message: 'Title must be less than 100 characters', + fatal: false, + enableLoginButton: false + }); + return false; + } let newWidget = { widget_id: widgetId, name: instanceName, @@ -830,4 +841,4 @@ const WidgetCreator = ({instId, widgetId, minHeight='', minWidth=''}) => { } -export default WidgetCreator \ No newline at end of file +export default WidgetCreator