diff --git a/public/pages/CreateMonitor/components/AssociateMonitors/AssociateMonitors.js b/public/pages/CreateMonitor/components/AssociateMonitors/AssociateMonitors.js index 56b3b8df3..59b55c658 100644 --- a/public/pages/CreateMonitor/components/AssociateMonitors/AssociateMonitors.js +++ b/public/pages/CreateMonitor/components/AssociateMonitors/AssociateMonitors.js @@ -46,8 +46,12 @@ const AssociateMonitors = ({ }); }); - _.set(monitorValues, 'associatedMonitorsEditor', JSON.stringify(value, null, 4)); - _.set(monitorValues, 'associatedMonitors', delegatesToMonitors(value)); + try { + _.set(monitorValues, 'associatedMonitorsEditor', JSON.stringify(value, null, 4)); + _.set(monitorValues, 'associatedMonitors', delegatesToMonitors(value)); + } catch (e) { + console.log('No monitor options are available.'); + } } else if (options?.length && !graphUi) { const value = { ...queryTemplate }; const firstTwo = options.slice(0, 2);