From dad4a7ad9765b919fb8e745f40401835635d3644 Mon Sep 17 00:00:00 2001 From: Ryan Sundberg Date: Sat, 4 May 2019 01:10:42 -0700 Subject: [PATCH] Fix running an output plugin with :onyx.core/params longer than 0 When :onyx.core/params is set, the (identity) function in operations.cljc throws because it can't handle more than one argument. Instead of usinging identity, we return the last argument (the segment). --- src/onyx/peer/operation.cljc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/onyx/peer/operation.cljc b/src/onyx/peer/operation.cljc index 5f106b74f..e5cb0dba1 100644 --- a/src/onyx/peer/operation.cljc +++ b/src/onyx/peer/operation.cljc @@ -38,7 +38,7 @@ (case (:onyx/language entry) :java (build-fn-java (:onyx/fn entry)) (kw->fn (:onyx/fn entry))))] - (or f identity)))) + (or f (fn [& args] (last args)))))) #?(:clj (defn instantiate-plugin-instance [class-name pipeline-data]