Skip to content

Commit

Permalink
fix: if empty then use fallback
Browse files Browse the repository at this point in the history
  • Loading branch information
adar2378 committed Mar 11, 2024
1 parent 7b69989 commit b1d2fc4
Showing 1 changed file with 3 additions and 1 deletion.
Expand Up @@ -59,7 +59,9 @@ abstract class RemoteConfigCubit extends HydratedCubit<RemoteConfigState>

emit(
state.copyWith(
config: result?.part_ ?? fallbackConfig,
config: (result?.part_ != null && result!.part_.isNotEmpty)
? result.part_
: fallbackConfig,
isLoading: false,
lastUpdate: lastUpdate,
),
Expand Down

0 comments on commit b1d2fc4

Please sign in to comment.