瀏覽代碼

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

Lucas Fernandes Nogueira 9 月之前
父節點
當前提交
fbb45c674c
共有 3 個文件被更改,包括 6 次插入1 次删除
  1. 5 0
      .changes/fix-register-listener.md
  2. 0 0
      crates/tauri/scripts/bundle.global.js
  3. 1 1
      packages/api/src/core.ts

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

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

File diff suppressed because it is too large
+ 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)
   )
 }

Some files were not shown because too many files changed in this diff