Skip to content
This repository was archived by the owner on May 19, 2025. It is now read-only.

Fix ReferenceError by removing uninitialized color fallback #665

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

AbbassJaber
Copy link

Types of changes

What types of changes does your code introduce?

Put an x in the boxes that apply

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Description

The existing implementation causes a reference issue with color, as it can unintentionally fallback to itself, leading to incorrect behavior. By removing || color, the assignment correctly prioritizes ranges[focusedRange[0]]?.color and rangeColors[focusedRange[0]], preventing unintended references.

Related Issue: #xxx

@drmax24
Copy link

drmax24 commented May 19, 2025

component was not released since 2021.
Why do you send a PR?..
Do you think the will be a new release?

I'm curious because the component is quite ld now and has compatibility problems with new versions of react.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants