diff --git a/src/pages/process/process.ts b/src/pages/process/process.ts index a051269..5dca5ce 100755 --- a/src/pages/process/process.ts +++ b/src/pages/process/process.ts @@ -37,20 +37,23 @@ export async function init() { search_div.appendChild(dropdown_icon); const processes = await getProcesses(); + let hasMessaging = false; for (const {key, value} of processes) { const processName = await getDescription(key, value); if (processName) { console.log('adding process name to list:', processName); + if (processName === "messaging") { + hasMessaging = true; + } const opt = new Option(processName); opt.value = processName; opt.setAttribute('data-process-id', key); element.add(opt); } } - const { autocomplete_options } = getOptions(element); - if (autocomplete_options.length === 0) { + if (!hasMessaging) { console.log('No existing processes - creating new messaging process'); await createMessagingProcess();