summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGustaf Rydholm <gustaf.rydholm@gmail.com>2022-04-05 22:49:05 +0200
committerGustaf Rydholm <gustaf.rydholm@gmail.com>2022-04-05 22:49:05 +0200
commit8b6f090a4799f88e05262591edf528dae12a58b8 (patch)
treefff23e6a7514ddb4b4956240f5606314fdbc1180
parentf896d92a19555335d024bcc73e276196aa01db0b (diff)
fix(util): add if when loading plugin
-rw-r--r--fnl/util.fnl5
1 files changed, 2 insertions, 3 deletions
diff --git a/fnl/util.fnl b/fnl/util.fnl
index ae52bac..eb706cc 100644
--- a/fnl/util.fnl
+++ b/fnl/util.fnl
@@ -3,8 +3,7 @@
(defn load-plugin [name]
(let [(ok? val-or-err) (pcall require name)]
- (when ok?
- (val-or-err))
- (when (not ok?)
+ (if ok?
+ (val-or-err)
(print "Could not load config: " val-or-err))))