mattermost / mattermost/mattermost-plugin-cloud

Webapp console error ` t.map is not a function`

Open
#97 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Type/Bug
Dominant language
Go
Stars
11
Forks
11
PR merge metrics
No merged PRs in 30d

Description

An error occurs with the Cloud plugin sometimes on community when opening a profile popover. Here is the minified code snippet that's causing the issue:

 var T, S, w, R = r(7363), O = r.n(R), A = r(7086), N = r.n(A);
        class k extends O().PureComponent {
            componentDidMount() {
                this.props.actions.getCloudUserData(this.props.id)
            }
            render() {
                const t = this.props.installs;
                if (0 === t.length)
                    return null;
                const e = t.map((t=>O().createElement("li", { // Error is happening right here
                    key: t.ID
                }, O().createElement("a", {
                    href: "https://" + t.DNS,
                    target: "_blank",
                    rel: "noopener noreferrer"
                }, t.Name))));
                return O().createElement("div", {
                    style: C.container
                }, O().createElement("div", null, "Cloud Servers"), O().createElement("ul", null, e))
            }
        }

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the React component that renders the Cloud Servers list and tracing the getCloudUserData response used as this.props.installs. Reproduce the profile popover error on community, then verify that opening it produces no console error and that the installs list renders when data is returned.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.