Skip to content

Commit 967f772

Browse files
fix: format files
1 parent 515c978 commit 967f772

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44

55
## Added
66

7-
- Add support for Feature Flags APIs `Instabug.addFeatureFlags`, `Instabug.removeFeatureFlags` and `Instabug.clearAllFeatureFlags` ([#1230](https://github.com/Instabug/Instabug-Flutter/pull/1230)).
7+
- Add support for Feature Flags APIs `Instabug.addFeatureFlags`, `Instabug.removeFeatureFlags` and `Instabug.clearAllFeatureFlags` ([#1230](https://github.com/Instabug/Instabug-React-Native/pull/1230)).
88

99
### Deprecated
1010

11-
- Deprecate Experiments APIs `Instabug.addExperiments`, `Instabug.removeExperiments` and `Instabug.clearAllExperiments` in favor of the new Feature Flags APIs ([#1230](https://github.com/Instabug/Instabug-Flutter/pull/1230)).
11+
- Deprecate Experiments APIs `Instabug.addExperiments`, `Instabug.removeExperiments` and `Instabug.clearAllExperiments` in favor of the new Feature Flags APIs ([#1230](https://github.com/Instabug/Instabug-React-Native/pull/1230)).
1212

1313
## [13.2.0](https://github.com/Instabug/Instabug-React-Native/compare/v13.1.1...v13.2.0) (July 7, 2024)
1414

src/modules/Instabug.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -571,12 +571,8 @@ export const clearAllExperiments = () => {
571571
* @param featureFlags An array of feature flags to add to the next report.
572572
*/
573573
export const addFeatureFlags = (featureFlags: FeatureFlag[]) => {
574-
const flags: Record<string, string | undefined> = {};
575-
576-
for (const item of featureFlags) {
577-
flags[item.name] = item.variant ? item.variant : '';
578-
}
579-
574+
const entries = featureFlags.map((item) => [item.name, item.variant || '']);
575+
const flags = Object.fromEntries(entries);
580576
NativeInstabug.addFeatureFlags(flags);
581577
};
582578

0 commit comments

Comments
 (0)