microsoft / microsoft/fluentui

[Bug]: @fluentui/web-components "InternalError: too much recursion" binary-search.js

Open
#30,886 7 comments 0 reactions 1 assignee View on GitHub

@chrisdholt is already working on this.

Since Mar 27, 2024.

Resolution: Soft Close web-components
Dominant language
TypeScript
Stars
20.3k
Forks
2.9k
Avg merge
2d 9h
Merged PRs (30d)
46

Description

Library

Web Components (@fluentui/web-components)

System Info
System:
    OS: Windows 10 10.0.19045
    CPU: (8) x64 Intel(R) Core(TM) i5-8265U CPU @ 1.60GHz
    Memory: 3.21 GB / 15.79 GB
  Browsers:
    Edge: Chromium (122.0.2365.92)
    Internet Explorer: 11.0.19041.3636
Are you reporting Accessibility issue?

None

Reproduction

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Too_much_recursion?utm_source=mozilla&utm_medium=firefox-console-errors&utm_campaign=default

Bug Description

Actual Behavior

Uncaught InternalError: too much recursion

Expected Behavior

Using the baseLayerLuminance design token I am switching the theme from light to dark. This also sort of works but not for every element and the binary-search.js throws a recursion error in the console

Logs
Uncaught InternalError: too much recursion
    binarySearch binary-search.js:4
    binarySearch binary-search.js:12
    binarySearch binary-search.js:12
    binarySearch binary-search.js:12
    binarySearch binary-search.js:12
binary-search.js:4:29
    binarySearch binary-search.js:4
    binarySearch binary-search.js:12
    binarySearch binary-search.js:12
    binarySearch binary-search.js:12
    binarySearch binary-search.js:12
    binarySearch binary-search.js:13
    binarySearch binary-search.js:13
    colorContrast palette.js:64
    contrastAndDeltaSwatchSet contrast-and-delta-swatch-set.js:10
    contrastAndDeltaSwatchSetByLuminance contrast-and-delta-swatch-set.js:23
    evaluate design-tokens.js:289
    accentFillRest design-tokens.js:293
    observe observable.js:75
    handleChange design-token.js:181
    notify notifier.js:95
    call observable.js:126
    notify notifier.js:103
    notify notifier.js:131
    set design-token.js:194
    handleChange design-token.js:181
    notify notifier.js:95
    call observable.js:126
    notify notifier.js:103
    notify notifier.js:131
    set design-token.js:194
    handleChange design-token.js:181
    notify notifier.js:95
    call observable.js:126
    notify notifier.js:95
    notify notifier.js:131
    set design-token.js:194
    handleChange design-token.js:181
    notify notifier.js:95
    call observable.js:126
    notify notifier.js:103
    notify notifier.js:131
    set design-token.js:194
    handleChange design-token.js:181
    notify notifier.js:95
    call observable.js:126
    notify notifier.js:103
    notify notifier.js:131
    set design-token.js:194
    handleChange design-token.js:181
    notify notifier.js:95
    call observable.js:126
    notify notifier.js:95
    notify notifier.js:131
    set design-token.js:194
    handleChange design-token.js:181
    notify notifier.js:95
    call observable.js:126
    notify notifier.js:103
    notify notifier.js:131
    set design-token.js:194
    handleChange design-token.js:181
    notify notifier.js:95
    call observable.js:126
    notify notifier.js:103
    notify notifier.js:131
    set design-token.js:194
    handleChange design-token.js:181
    notify notifier.js:95
    call observable.js:126
    notify notifier.js:95
    notify notifier.js:131
    set design-token.js:194
    handleChange design-token.js:181
    notify notifier.js:95
    call observable.js:126
    notify notifier.js:103
    notify notifier.js:131
    set design-token.js:194
    handleChange design-token.js:181
    notify notifier.js:95
    call observable.js:126
    notify notifier.js:103
    notify notifier.js:131
    set design-token.js:194
    handleChange design-token.js:181
    notify notifier.js:95
    call observable.js:126
    notify notifier.js:95
    notify notifier.js:131
    set design-token.js:194
    handleChange design-token.js:181
    notify notifier.js:95
    call observable.js:126
    notify notifier.js:103
    notify notifier.js:131
    set design-token.js:194
    handleChange design-token.js:181
    notify notifier.js:95
    call observable.js:126
    notify notifier.js:103
    notify notifier.js:131
    set design-token.js:194
    handleChange design-token.js:181
    notify notifier.js:95
    call observable.js:126
    notify notifier.js:95
    notify notifier.js:131
    set design-token.js:194
    handleChange design-token.js:181
    notify notifier.js:95
    call observable.js:126
    notify notifier.js:103
    notify notifier.js:131
    set design-token.js:194
    handleChange design-token.js:181
    notify notifier.js:95
    call observable.js:126
    notify notifier.js:103
    notify notifier.js:131
    set design-token.js:194
    handleChange design-token.js:181
    notify notifier.js:95
    call observable.js:126
    notify notifier.js:95
    notify notifier.js:131
    set design-token.js:194
    handleChange design-token.js:181
    notify notifier.js:95
    call observable.js:126
    notify notifier.js:103
    notify notifier.js:131
    set design-token.js:194
    handleChange design-token.js:181
Requested priority

Normal

Products/sites affected

No response

Are you willing to submit a PR to fix?

no

Validations
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • The provided reproduction is a minimal reproducible example of the bug.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.