Skip to content

fix: duplicate components if code key exists but is undefined #95

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 22, 2021

Conversation

yuqu
Copy link
Contributor

@yuqu yuqu commented Nov 21, 2021

Change description

pluginResponses can have objects like the below sample, which causes duplicate connected components to show up on API request, hence on the Zeplin apps.

[
  {
    code: {
      snippet: '<Button\n' +
        '  primary={bool}\n' +
        '  backgroundColor={string}\n' +
        '  size={enum}\n' +
        '  label={string}\n' +
        '  onClick={func} />',
      lang: 'jsx'
    },
    description: 'Primary UI component for user interaction',
    links: []
  },
  {
    code: undefined,
    description: undefined,
    links: [ [Object], [Object], [Object], [Object] ]
  }
]

Type of change

  • Bug fix (fixes an issue)
  • New feature (adds functionality)

Checklists

Development

  • Lint rules pass locally
  • Application changes have been tested thoroughly
  • Automated tests covering modified code pass

Security

  • Security impact of change has been considered
  • Code follows company security practices and guidelines

Code review

  • Pull request has a descriptive title and context useful to a reviewer. Screenshots or screencasts are attached as necessary
  • "Ready for review" label attached and reviewers assigned
  • Changes have been reviewed by at least one other contributor
  • Pull request linked to task tracker where applicable

@yuqu yuqu requested a review from skarahoda November 21, 2021 22:31
@yuqu yuqu force-pushed the fix-duplicate-components branch from f67ffaa to 990250e Compare November 22, 2021 11:51
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@yuqu yuqu merged commit 2f75a7d into main Nov 22, 2021
@yuqu yuqu deleted the fix-duplicate-components branch November 22, 2021 11:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants