Skip to content

Commit

Permalink
fix(deep-link): allow empty config values (#1732)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasfernog authored Sep 4, 2024
1 parent feb1e93 commit 4654591
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changes/fix-deep-link-config.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"deep-link": patch
---

Allow empty configuration values.
8 changes: 8 additions & 0 deletions plugins/deep-link/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,12 @@ where
#[derive(Deserialize)]
pub struct Config {
/// Mobile requires `https://<host>` urls.
#[serde(default)]
pub mobile: Vec<AssociatedDomain>,
/// Desktop requires urls starting with `<scheme>://`.
/// These urls are also active in dev mode on Android.
#[allow(unused)] // Used in tauri-bundler
#[serde(default)]
pub desktop: DesktopProtocol,
}

Expand All @@ -46,3 +48,9 @@ pub enum DesktopProtocol {
One(DeepLinkProtocol),
List(Vec<DeepLinkProtocol>),
}

impl Default for DesktopProtocol {
fn default() -> Self {
Self::List(Vec::new())
}
}

0 comments on commit 4654591

Please sign in to comment.