Skip to content

Commit de69e07

Browse files
fix(storage, windows): putFile(), putString(), putData() & Task streaming event fixes (#12723)
1 parent a7c8c62 commit de69e07

File tree

11 files changed

+481
-192
lines changed

11 files changed

+481
-192
lines changed

packages/firebase_core/firebase_core/windows/firebase_core_plugin.cpp

+9-4
Original file line numberDiff line numberDiff line change
@@ -79,14 +79,19 @@ PigeonFirebaseOptions optionsFromFIROptions(
7979
PigeonFirebaseOptions pigeon_options = PigeonFirebaseOptions();
8080
pigeon_options.set_api_key(options.api_key());
8181
pigeon_options.set_app_id(options.app_id());
82-
if (options.database_url() != nullptr) {
83-
pigeon_options.set_database_u_r_l(options.database_url());
82+
// AppOptions initialises as empty char so we check to stop empty string to
83+
// Flutter Same for storage bucket below
84+
const char *db_url = options.database_url();
85+
if (db_url != nullptr && db_url[0] != '\0') {
86+
pigeon_options.set_database_u_r_l(db_url);
8487
}
8588
pigeon_options.set_tracking_id(nullptr);
8689
pigeon_options.set_messaging_sender_id(options.messaging_sender_id());
8790
pigeon_options.set_project_id(options.project_id());
88-
if (options.storage_bucket() != nullptr) {
89-
pigeon_options.set_storage_bucket(options.storage_bucket());
91+
92+
const char *storage_bucket = options.storage_bucket();
93+
if (storage_bucket != nullptr && storage_bucket[0] != '\0') {
94+
pigeon_options.set_storage_bucket(storage_bucket);
9095
}
9196
return pigeon_options;
9297
}

0 commit comments

Comments
 (0)