소스 검색

fix: use default values for scopes on serde

Lucas Nogueira 3 년 전
부모
커밋
ae60a6e892
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      core/tauri-utils/src/config.rs

+ 2 - 0
core/tauri-utils/src/config.rs

@@ -592,6 +592,7 @@ impl Default for FsAllowlistScope {
 #[serde(rename_all = "camelCase", deny_unknown_fields)]
 pub struct FsAllowlistConfig {
   /// The access scope for the filesystem APIs.
+  #[serde(default)]
   pub scope: FsAllowlistScope,
   /// Use this flag to enable all file system API features.
   #[serde(default)]
@@ -1080,6 +1081,7 @@ impl Allowlist for PathAllowlistConfig {
 #[serde(rename_all = "camelCase", deny_unknown_fields)]
 pub struct ProtocolAllowlistConfig {
   /// The access scope for the asset protocol.
+  #[serde(default)]
   pub asset_scope: FsAllowlistScope,
   /// Use this flag to enable all custom protocols.
   #[serde(default)]