Skip to content

username is array #33

Description

@z330789559

getUserNameByPrincipal(auth.identity.getPrincipal()).then((userName) => {
if (userName) {
// User exists! Set user and redirect to /feed.
getUserFromCanister(Array.isArray(userName)?userName[userName.length-1]:userName).then((user) => {
setIsCheckingICForUser(false);
auth.setUser(user!);
history.replace("/feed");
});
setIsCheckingICForUser(false);
} else {
// Do nothing. Allow the user to create a userId
setIsCheckingICForUser(false);
}

userName is array ,origin code case error

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions