landscape: add fallback to getFeedPath
Fixes urbit/landscape#961
@@ -56,7 +56,7 @@ export function parentPath(path: string) {
* string -> enabled feed
*/
export function getFeedPath(association: Association): string | null | undefined {
- const { metadata } = association;
+ const { metadata = { config: {} } } = association;
if (metadata.config && 'group' in metadata?.config && metadata.config?.group) {
if ('resource' in metadata.config.group) {
return metadata.config.group.resource;
