Closed telackey closed 3 years ago
This code throws an error if there is no name field:
name
useEffect(() => { if (Array.isArray(registryBotFactories)) { const botFactory = registryBotFactories.find(({ name }) => name === window.location.hostname) || registryBotFactories.find(({ name }) => name.endsWith(BOT_FACTORY_DOMAIN)); if (botFactory) { setBotFactoryTopic(botFactory.topic); setAdvanced(false); } else { setAdvanced(true); } } }, [registryBotFactories])
But most manually registered bot-factories do not have names (see https://apollo1.kube.moon.dxos.network/app/wrn:dxos:application:console/#/registry).
It makes more or less a matter of luck that most of our usage has happened to be on kubes with bot-factories where the window.location matched the name in the bot-factory registration.
This code throws an error if there is no
name
field:But most manually registered bot-factories do not have names (see https://apollo1.kube.moon.dxos.network/app/wrn:dxos:application:console/#/registry).
It makes more or less a matter of luck that most of our usage has happened to be on kubes with bot-factories where the window.location matched the name in the bot-factory registration.