Skip to content

[Bug]: Stack in @fluentui/react version 8.101.2 changed to rendering falsy elements instead of returning null causes zeros to render #28970

Description

@ghadnani

Library

React / v8 (@fluentui/react)

System Info

react v. 16
@fluentui/react v. 8.101.2

Stack in @fluentui/react version 8.101.2 changed to rendering falsy elements instead of returning null. 

This change caused many zeroes to appear in Stack's children that were zeroes but consumers were expecting them to be nulled by Stack. 

This is a breaking change on our side as consumers.

Here is a codepen demonstrating the behavior expected in 8.101.1
https://codepen.io/ghadnani/pen/oNJXMBL

And here is a codepen demonstrating the breaking change in 8.101.2
https://codepen.io/ghadnani/pen/mdaJjRw

Expected:
image

Rendered:
image

Are you reporting Accessibility issue?

None

Reproduction

https://codepen.io/ghadnani/pen/mdaJjRw

Bug Description

Actual Behavior

Zeroes and other falsy elements changed to being rendered by Stack.

Expected Behavior

Zeroes and other falsy elements to continue being nulled out by Stack.

Logs

No response

Requested priority

Normal

Products/sites affected

AMC (account.microsoft.com)

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions