fix: return the function's result in hook-lifecycle-fn! (#11712)

This is needed for prevent-default-behaviour, which just returns
`false`.

Fixes #11711.

Co-authored-by: Charlie <xyhp915@qq.com>
This commit is contained in:
Tomasz Kontusz
2026-01-25 03:31:17 +01:00
committed by GitHub
parent 0e2a223b2b
commit 3a3e14b790

View File

@@ -782,9 +782,10 @@
(when (and type (fn? f))
(when config/lsp-enabled?
(hook-plugin-app (str :before-command-invoked type) nil))
(apply f args)
(when config/lsp-enabled?
(hook-plugin-app (str :after-command-invoked type) nil))))
(let [result (apply f args)]
(when config/lsp-enabled?
(hook-plugin-app (str :after-command-invoked type) nil))
result)))
(defn load-plugin-from-web-url!
[url]