Skip to content
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

Changing const after declaring it causes an error #408

Closed
gds-prue opened this issue Jul 3, 2023 · 1 comment
Closed

Changing const after declaring it causes an error #408

gds-prue opened this issue Jul 3, 2023 · 1 comment

Comments

@gds-prue
Copy link

gds-prue commented Jul 3, 2023

versions:2.3.1

position:/src/index.tsx 202line

`
static getDerivedStateFromProps(props: SliderProps, state: SliderState) {
if (
props.trackMarks &&
!!state.trackMarksValues &&
state.trackMarksValues.length > 0
) {
const newTrackMarkValues = normalizeValue(props, props.trackMarks);
const statePatch = {} as SliderState;

        if (state.trackMarksValues) {
            statePatch.trackMarksValues = updateValues({
                values: state.trackMarksValues,
                newValues: newTrackMarkValues,
            });
        }

        return statePatch;
    }
}

`
Declaration const statePatch before change iI

@gds-prue
Copy link
Author

gds-prue commented Jul 3, 2023

not error
sorry
close it

@gds-prue gds-prue closed this as completed Jul 3, 2023
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

No branches or pull requests

1 participant