Bläddra i källkod

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

Lucas Fernandes Nogueira 1 år sedan
förälder
incheckning
6cb601d42e
2 ändrade filer med 6 tillägg och 1 borttagningar
  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),