reflex icon indicating copy to clipboard operation
reflex copied to clipboard

Catch a JS Error + code cleanup

Open Lendemor opened this issue 2 years ago β€’ 0 comments

Description

Changes:

  • Small refactoring in the hydrate middleware
  • Add some security check to Icon component (to prevent some JS error being thrown)
    • Throw error if children passed to pc.icon()
    • Throw error if tag component is not passed.

Checklist

All Submissions:

  • [x] Have you followed the guidelines stated in CONTRIBUTING.md file?
  • [x] Have you checked to ensure there aren't any other open Pull Requests for the desired changed?

Type of change

  • [x] Bug fix (non-breaking change which fixes an issue)

New Feature Submission:

  • [x] Does your submission pass the tests?
  • [x] Have you linted your code locally prior to submission?

Changes To Core Features:

  • [x] Have you added an explanation of what your changes do and why you'd like us to include them?
  • [x] Have you successfully ran tests with your changes locally?

Lendemor avatar Jan 29 '23 15:01 Lendemor