Explorar el Código

fix(api): broken `addPluginListener` implementation, closes #8068 (#11423)

Lucas Fernandes Nogueira hace 9 meses
padre
commit
fbb45c674c

+ 5 - 0
.changes/fix-register-listener.md

@@ -0,0 +1,5 @@
+---
+"@tauri-apps/api": patch:bug
+---
+
+Fixes `addPluginListener` not working.

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 0
crates/tauri/scripts/bundle.global.js


+ 1 - 1
packages/api/src/core.ts

@@ -118,7 +118,7 @@ async function addPluginListener<T>(
 ): Promise<PluginListener> {
   const handler = new Channel<T>()
   handler.onmessage = cb
-  return invoke(`plugin:${plugin}|register_listener`, { event, handler }).then(
+  return invoke(`plugin:${plugin}|registerListener`, { event, handler }).then(
     () => new PluginListener(plugin, event, handler.id)
   )
 }

Algunos archivos no se mostraron porque demasiados archivos cambiaron en este cambio