Skip to content

Commit 4654591

Browse files
authored
fix(deep-link): allow empty config values (#1732)
1 parent feb1e93 commit 4654591

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

.changes/fix-deep-link-config.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"deep-link": patch
3+
---
4+
5+
Allow empty configuration values.

plugins/deep-link/src/config.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,12 @@ where
3232
#[derive(Deserialize)]
3333
pub struct Config {
3434
/// Mobile requires `https://<host>` urls.
35+
#[serde(default)]
3536
pub mobile: Vec<AssociatedDomain>,
3637
/// Desktop requires urls starting with `<scheme>://`.
3738
/// These urls are also active in dev mode on Android.
3839
#[allow(unused)] // Used in tauri-bundler
40+
#[serde(default)]
3941
pub desktop: DesktopProtocol,
4042
}
4143

@@ -46,3 +48,9 @@ pub enum DesktopProtocol {
4648
One(DeepLinkProtocol),
4749
List(Vec<DeepLinkProtocol>),
4850
}
51+
52+
impl Default for DesktopProtocol {
53+
fn default() -> Self {
54+
Self::List(Vec::new())
55+
}
56+
}

0 commit comments

Comments
 (0)