@balena/ui-shared-components 14.0.4-build-drop-some-lodash-for-native-alternatives-08973d106813347e91ab0994908d47f23f34bc6c-1 → 14.0.4-build-drop-some-lodash-for-native-alternatives-2262746e9e370b6af606616f09e32c1ca2a3232d-1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -25,9 +25,9 @@ export const DropDownButton = (_a) => {
25
25
  return items;
26
26
  }
27
27
  const grouped = groupBy(items, (item) => item[groupByProp]);
28
- const keys = Object.keys(grouped);
29
- const lastKey = keys[keys.length - 1];
30
- return Object.entries(grouped)
28
+ const entries = Object.entries(grouped);
29
+ const lastKey = entries[entries.length - 1][0];
30
+ return entries
31
31
  .flatMap(([key, value]) => value.map((v, index) => key !== lastKey && index === value.length - 1
32
32
  ? Object.assign(Object.assign({}, v), { divider: true }) : v))
33
33
  .filter(Boolean);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@balena/ui-shared-components",
3
- "version": "14.0.4-build-drop-some-lodash-for-native-alternatives-08973d106813347e91ab0994908d47f23f34bc6c-1",
3
+ "version": "14.0.4-build-drop-some-lodash-for-native-alternatives-2262746e9e370b6af606616f09e32c1ca2a3232d-1",
4
4
  "main": "./dist/index.js",
5
5
  "sideEffects": false,
6
6
  "files": [
@@ -132,7 +132,7 @@
132
132
  },
133
133
  "homepage": "https://github.com/balena-io/ui-shared-components#readme",
134
134
  "versionist": {
135
- "publishedAt": "2025-09-23T15:58:34.002Z"
135
+ "publishedAt": "2025-09-23T16:12:40.232Z"
136
136
  },
137
137
  "overrides": {
138
138
  "storybook": "$storybook"