From c5b647fae6f9a7ff452a509f2b807a3ff8596a79 Mon Sep 17 00:00:00 2001 From: Lachezar Lechev Date: Sun, 22 Oct 2023 14:32:22 +0300 Subject: [PATCH] fix: StreamsBucket - use profile.uid() on missing bucket Signed-off-by: Lachezar Lechev --- src/stremio_core_web.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/stremio_core_web.rs b/src/stremio_core_web.rs index 9232333..c29b572 100644 --- a/src/stremio_core_web.rs +++ b/src/stremio_core_web.rs @@ -82,7 +82,8 @@ pub async fn initialize_runtime(emit_to_ui: js_sys::Function) -> Result<(), JsVa if let Some(other_bucket) = other_bucket { library.merge_bucket(other_bucket); }; - let streams_bucket = streams_bucket.unwrap_or_default(); + let streams_bucket = + streams_bucket.unwrap_or_else(|| StreamsBucket::new(profile.uid())); let notifications_bucket = notifications_bucket .unwrap_or(NotificationsBucket::new::(profile.uid(), vec![])); let (model, effects) =