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

This commit is contained in:
Lucas Fernandes Nogueira 2024-10-20 09:07:51 -03:00 committed by GitHub
parent eb61d44f9f
commit fbb45c674c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 7 additions and 2 deletions

View File

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

File diff suppressed because one or more lines are too long

View File

@ -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)
)
}