浏览代码

fix(core): convert mobile command name to camelCase, closes #8872 (#8983)

Lucas Fernandes Nogueira 1 年之前
父节点
当前提交
6cb601d42e
共有 2 个文件被更改,包括 6 次插入1 次删除
  1. 5 0
      .changes/fix-mobile-cmd-case.md
  2. 1 1
      core/tauri/src/webview/mod.rs

+ 5 - 0
.changes/fix-mobile-cmd-case.md

@@ -0,0 +1,5 @@
+---
+"tauri": patch:bug
+---
+
+Convert the command name to camelCase when executing a mobile plugin command.

+ 1 - 1
core/tauri/src/webview/mod.rs

@@ -1232,7 +1232,7 @@ fn main() {
           if let Err(e) = crate::plugin::mobile::run_command(
             plugin,
             &app_handle,
-            message.command,
+            heck::AsLowerCamelCase(message.command).to_string(),
             payload,
             move |response| match response {
               Ok(r) => resolver_.resolve(r),