Skip to content

Conversation

@arkarlov
Copy link
Owner

πŸ› οΈ Fix: Skip explicit undefined values in stringifyCSSProperties
This PR fixes #11 β€” handling cases where CSSProperties may contain value is explicitly set to undefined.

βœ… Changes
Added a type guard to ensure only string or number values are processed.

Updated stringifyCSSProperties to skip properties with invalid values (undefined, null, objects, etc.).

Removed a test case that expected an error to be thrown for invalid input β€” since invalid values are now gracefully ignored.

Added new tests for undefined and null cases.

Added a publishing checklist doc (docs/publishing.md) with manual publishing instructions.

βœ… Expected behavior
Previously, passing undefined values caused the lib to throw.
Now such values are silently skipped, ensuring safe and predictable behavior.

@arkarlov arkarlov self-assigned this May 15, 2025
@arkarlov arkarlov added bug Something isn't working documentation Improvements or additions to documentation labels May 15, 2025
@arkarlov arkarlov merged commit f80b042 into main May 15, 2025
1 check passed
@arkarlov arkarlov deleted the fix/ignore-invalid-values branch May 16, 2025 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support undefined for values

2 participants