mirror of
https://github.com/tauri-apps/plugins-workspace.git
synced 2026-04-21 11:26:15 +02:00
fix(deep-link): allow empty config values (#1732)
This commit is contained in:
committed by
GitHub
parent
feb1e93fcb
commit
4654591d82
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"deep-link": patch
|
||||
---
|
||||
|
||||
Allow empty configuration values.
|
||||
@@ -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,
|
||||
}
|
||||
|
||||
@@ -46,3 +48,9 @@ pub enum DesktopProtocol {
|
||||
One(DeepLinkProtocol),
|
||||
List(Vec<DeepLinkProtocol>),
|
||||
}
|
||||
|
||||
impl Default for DesktopProtocol {
|
||||
fn default() -> Self {
|
||||
Self::List(Vec::new())
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user