Bladeren bron

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 <[email protected]>
Tomasz Kontusz 1 week geleden
bovenliggende
commit
3a3e14b790
1 gewijzigde bestanden met toevoegingen van 4 en 3 verwijderingen
  1. 4 3
      src/main/frontend/handler/plugin.cljs

+ 4 - 3
src/main/frontend/handler/plugin.cljs

@@ -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]