diff --git a/.changes/fix-deep-link-config.md b/.changes/fix-deep-link-config.md new file mode 100644 index 00000000..81b5bcf1 --- /dev/null +++ b/.changes/fix-deep-link-config.md @@ -0,0 +1,5 @@ +--- +"deep-link": patch +--- + +Allow empty configuration values. diff --git a/plugins/deep-link/src/config.rs b/plugins/deep-link/src/config.rs index 1796aa63..9cd2e66b 100644 --- a/plugins/deep-link/src/config.rs +++ b/plugins/deep-link/src/config.rs @@ -32,10 +32,12 @@ where #[derive(Deserialize)] pub struct Config { /// Mobile requires `https://` urls. + #[serde(default)] pub mobile: Vec, /// Desktop requires urls starting with `://`. /// These urls are also active in dev mode on Android. #[allow(unused)] // Used in tauri-bundler + #[serde(default)] pub desktop: DesktopProtocol, } @@ -46,3 +48,9 @@ pub enum DesktopProtocol { One(DeepLinkProtocol), List(Vec), } + +impl Default for DesktopProtocol { + fn default() -> Self { + Self::List(Vec::new()) + } +}