Skip to content

chore(templates): remove redundant condition check#12130

Merged
paulpopus merged 2 commits into
payloadcms:mainfrom
ewurch:chore(templates)/remove-redundancy
Apr 2, 2026
Merged

chore(templates): remove redundant condition check#12130
paulpopus merged 2 commits into
payloadcms:mainfrom
ewurch:chore(templates)/remove-redundancy

Conversation

@ewurch

@ewurch ewurch commented Apr 16, 2025

Copy link
Copy Markdown
Contributor

This PR fixes a redundant condition check on the Card element

from:

     <div className="p-4">
        {showCategories && hasCategories && (
          <div className="uppercase text-sm mb-4">
             {showCategories && hasCategories && (
              <div>
...

to:

     <div className="p-4">
        {showCategories && hasCategories && (
          <div className="uppercase text-sm mb-4">
...

@github-actions github-actions Bot added the stale label May 18, 2025
@github-actions github-actions Bot removed the stale label Jan 22, 2026
@github-actions github-actions Bot added the stale label Feb 21, 2026
@paulpopus paulpopus enabled auto-merge (squash) April 2, 2026 19:25
@paulpopus paulpopus merged commit cf0a883 into payloadcms:main Apr 2, 2026
21 checks passed
@github-actions

github-actions Bot commented Apr 8, 2026

Copy link
Copy Markdown
Contributor

🚀 This is included in version v3.82.0

milamer pushed a commit to milamer/payload that referenced this pull request Apr 20, 2026
<!--

Thank you for the PR! Please go through the checklist below and make
sure you've completed all the steps.

Please review the
[CONTRIBUTING.md](https://github.com/payloadcms/payload/blob/main/CONTRIBUTING.md)
document in this repository if you haven't already.

The following items will ensure that your PR is handled as smoothly as
possible:

- PR Title must follow conventional commits format. For example, `feat:
my new feature`, `fix(plugin-seo): my fix`.
- Minimal description explained as if explained to someone not
immediately familiar with the code.
- Provide before/after screenshots or code diffs if applicable.
- Link any related issues/discussions from GitHub or Discord.
- Add review comments if necessary to explain to the reviewer the logic
behind a change

### What?

### Why?

### How?

Fixes #

-->
This PR fixes a redundant condition check on the Card element

from:
```typescript
     <div className="p-4">
        {showCategories && hasCategories && (
          <div className="uppercase text-sm mb-4">
             {showCategories && hasCategories && (
              <div>
...
```

to:
```typescript
     <div className="p-4">
        {showCategories && hasCategories && (
          <div className="uppercase text-sm mb-4">
...
```

Co-authored-by: Paul Popus <paul@payloadcms.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants