mirror of
https://github.com/urbit/shrub.git
synced 2024-12-02 21:34:04 +03:00
interface: handle undefined group metadata correctly
This commit is contained in:
parent
01aaeb7883
commit
f28735316e
@ -56,8 +56,11 @@ export function parentPath(path: string) {
|
||||
* string -> enabled feed
|
||||
*/
|
||||
export function getFeedPath(association: Association): string | null | undefined {
|
||||
const { metadata = { config: {} } } = association;
|
||||
if (metadata.config && 'group' in metadata?.config && metadata.config?.group) {
|
||||
const metadata = association?.metadata;
|
||||
if(!metadata) {
|
||||
return undefined;
|
||||
}
|
||||
if (metadata?.config && 'group' in metadata?.config && metadata.config?.group) {
|
||||
if ('resource' in metadata.config.group) {
|
||||
return metadata.config.group.resource;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user