phase2 / outline

Tooling infrastructure for modern web component development.
https://outline.phase2tech.com
MIT License
128 stars 27 forks source link

return false if no slots found using slotExists() #361

Closed shaal closed 1 year ago

shaal commented 1 year ago

Description

slotExists() returns empty array (which is truthy), that can be confusing when components trying to check if a slot exist or not. This PR (already in latest Outline codebase) return false if the slot does not exist.

Fixes # (issue)

Type of change

Please delete options that are not relevant.

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

Checklist

changeset-bot[bot] commented 1 year ago

⚠️ No Changeset found

Latest commit: 32bf01c96b5fd1091ea70c8a8d33eb52a40a5d96

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

[Click here if you're a maintainer who wants to add a changeset to this PR](https://github.com/phase2/outline/new/slotExists-bug-fix?filename=.changeset/many-crabs-admire.md&value=---%0A%22%40fake-scope%2Ffake-pkg%22%3A%20patch%0A---%0A%0Areturn%20false%20if%20no%20slots%20found%20using%20slotExists()%0A)