Merge pull request #5009 from urbit/mp/landscape/loosen

landscape: loosen owner check in popover
This commit is contained in:
matildepark 2021-06-14 15:52:16 -05:00 committed by GitHub
commit 30cce281ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -56,8 +56,8 @@ export function parentPath(path: string) {
* string -> enabled feed
*/
export function getFeedPath(association: Association): string | null | undefined {
const { metadata } = association;
if(metadata.config && 'group' in metadata?.config && metadata.config?.group) {
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;
}

View File

@ -31,7 +31,7 @@ export function PopoverRoutes(
const groupSize = props.group.members.size;
const owner = resourceFromPath(props.association.group).ship.slice(1) === window.ship;
const owner = resourceFromPath(props.association?.group ?? '~zod/group').ship.slice(1) === window.ship;
const admin = props.group?.tags?.role?.admin.has(window.ship) || false;