Skip to content

Conversation

@fenghan34
Copy link
Contributor

What does it do?

Remove the redundant curly bracket and comma.

Change following code

module.exports = (policyContext, config, { strapi }) => {
    if (ctx.state.user && ctx.state.user.isActive) {
      return true;
    }

    return false;
  },
};

to

module.exports = (policyContext, config, { strapi }) => {
    if (ctx.state.user && ctx.state.user.isActive) {
      return true;
    }

    return false;
};

Why is it needed?

To make this example code valid.

Related issue(s)/PR(s)

Remove the redundant curly bracket and comma.
@strapi-cla
Copy link

strapi-cla commented Nov 25, 2022

CLA assistant check
All committers have signed the CLA.

@vercel
Copy link

vercel bot commented Nov 25, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
documentation ✅ Ready (Inspect) Visit Preview Nov 25, 2022 at 10:48AM (UTC)
documentation-docu-mvp ❌ Failed (Inspect) Nov 25, 2022 at 10:48AM (UTC)

Copy link
Contributor

@stb13579 stb13579 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks @fenghan34

@stb13579 stb13579 self-assigned this Nov 25, 2022
@stb13579 stb13579 added the target: v4 Documentation PRs/issues targeting content from docs.strapi.io (main branch). label Nov 25, 2022
@stb13579 stb13579 added this to the 4.5.3 milestone Nov 25, 2022
@stb13579 stb13579 added source: Dev Docs PRs/issues targeting the Developer Docs size: small If the PR includes only 1 file with <10 lines of text or a small code fix pr: code fix PRs only fixing existing code examples labels Nov 25, 2022
@stb13579 stb13579 merged commit d09a6a5 into strapi:main Nov 29, 2022
@pwizla pwizla modified the milestones: 4.5.3, 4.6.0-beta.1 Nov 30, 2022
@strapi-bot
Copy link

This pull request has been mentioned on Strapi Community Forum. There might be relevant details there:

https://forum.strapi.io/t/new-documentation-release-strapi-v4-5-3/23929/1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr: code fix PRs only fixing existing code examples size: small If the PR includes only 1 file with <10 lines of text or a small code fix source: Dev Docs PRs/issues targeting the Developer Docs target: v4 Documentation PRs/issues targeting content from docs.strapi.io (main branch).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants