diff --git a/packages/fluentui/CHANGELOG.md b/packages/fluentui/CHANGELOG.md index 3773c6d6b3cbf9..a7f346b7744d9c 100644 --- a/packages/fluentui/CHANGELOG.md +++ b/packages/fluentui/CHANGELOG.md @@ -35,6 +35,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm - Remove unsupported values for `size` prop in `Button` component @notandrew ([#16416](https://github.com/microsoft/fluentui/pull/16416)) ### Fixes +- Fix `useTree` by changing `env.NODE` to `env.NODE_ENV` @yuanboxue-amber ([#16630](https://github.com/microsoft/fluentui/pull/16630)) - optimize largest icons used by calling @yuanboxue-amber ([#16590](https://github.com/microsoft/fluentui/pull/16590)) - Fix selectable `Tree` where node with unselectable children displaying wrong selection state @yuanboxue-amber ([#16158](https://github.com/microsoft/fluentui/pull/16158)) - Fix screen reader narrates incorrect items count for `toolbar` menu with radio group @yuanboxue-amber ([#15951](https://github.com/microsoft/fluentui/pull/15951)) diff --git a/packages/fluentui/react-northstar/src/components/Tree/hooks/useTree.ts b/packages/fluentui/react-northstar/src/components/Tree/hooks/useTree.ts index 246e14c71feafe..d7e714fcf33181 100644 --- a/packages/fluentui/react-northstar/src/components/Tree/hooks/useTree.ts +++ b/packages/fluentui/react-northstar/src/components/Tree/hooks/useTree.ts @@ -20,7 +20,7 @@ function useGetItemById(flatTree: FlatTree): GetItemById { // We are assigning a callback during render as it can be used during render and in event handlers. In dev mode we // are freezing objects to prevent their mutations callbackRef.current = itemId => - process.env.NODE === 'production' ? flatTree[itemId] : Object.freeze(flatTree[itemId]); + process.env.NODE_ENV === 'production' ? flatTree[itemId] : Object.freeze(flatTree[itemId]); return React.useCallback((...args) => { return callbackRef.current(...args);