From 6cb601d42e2af75aa818371b8b8f7d5b2e77dc90 Mon Sep 17 00:00:00 2001 From: Lucas Fernandes Nogueira Date: Mon, 26 Feb 2024 12:54:31 -0300 Subject: [PATCH] fix(core): convert mobile command name to camelCase, closes #8872 (#8983) --- .changes/fix-mobile-cmd-case.md | 5 +++++ core/tauri/src/webview/mod.rs | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changes/fix-mobile-cmd-case.md diff --git a/.changes/fix-mobile-cmd-case.md b/.changes/fix-mobile-cmd-case.md new file mode 100644 index 000000000..653e2c007 --- /dev/null +++ b/.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. diff --git a/core/tauri/src/webview/mod.rs b/core/tauri/src/webview/mod.rs index 2e4bafe9e..43a9b3f14 100644 --- a/core/tauri/src/webview/mod.rs +++ b/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),