1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-11 00:08:30 +01:00

fix: check variants before mapping (#1922)

* fix: check variants before mapping

* fix: default to empty array
This commit is contained in:
Fredrik Strand Oseberg 2022-08-16 13:39:20 +02:00 committed by GitHub
parent c8f0283049
commit c82318d4c5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -19,7 +19,7 @@ export const mapFeaturesForBootstrap = (
features.map((feature) => ({
impressionData: false,
...feature,
variants: feature.variants.map((variant) => ({
variants: (feature.variants || []).map((variant) => ({
overrides: [],
...variant,
payload: variant.payload && {