Skip to content

Functions that have a SelectMany in the LINQ query need a null check #62

@NullReferenceError

Description

@NullReferenceError

Functions like "Get-GDriveComment", "Get-GAGroup" or "Get-GAGroupMember" should have some kind of null check to prevent the enumeration from returning a null reference exception when ToList is run on the result set. Create an empty group and call "Get-GAGroupMember" to recreate this issue.

IE, For Get-GAGroupMember:

WriteObject(members.List(GroupName, properties, StandardQueryParams: StandardQueryParams).Where(x => x.MembersValue != null).SelectMany(x => x.MembersValue).ToList());

This fix prevents the error from being thrown, but not sure if the empty result set should be something else:

NullReferenceError@d4286b9

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions