Skip to content

Commit

Permalink
Set default values to new app fields to avoid crash due to prefs not …
Browse files Browse the repository at this point in the history
…having them stored (#1280)
  • Loading branch information
beastoin authored Nov 11, 2024
2 parents 7c63c72 + a3fbfc4 commit 3b0c6a0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions app/lib/backend/schema/app.dart
Original file line number Diff line number Diff line change
Expand Up @@ -203,12 +203,12 @@ class App {

factory App.fromJson(Map<String, dynamic> json) {
return App(
category: json['category'],
approved: json['approved'],
status: json['status'],
category: json['category'] ?? 'other',
approved: json['approved'] ?? true,
status: json['status'] ?? 'approved',
id: json['id'],
email: json['email'],
uid: json['uid'],
email: json['email'] ?? '',
uid: json['uid'] ?? '',
name: json['name'],
author: json['author'],
description: json['description'],
Expand Down

0 comments on commit 3b0c6a0

Please sign in to comment.