Skip to content

Commit

Permalink
Simplify arg.value in StringToJson
Browse files Browse the repository at this point in the history
  • Loading branch information
agrare committed Aug 9, 2023
1 parent 164f68a commit e042ce0
Showing 1 changed file with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,7 @@ module States
class StringToJson < Floe::Workflow::IntrinsicFunction
def value(context, inputs)
arg = args.first
arg =
if arg.kind_of?(Floe::Workflow::Path) || arg.kind_of?(Floe::Workflow::IntrinsicFunction)
arg.value(context, inputs)
else
arg
end
arg = arg.value(context, inputs) if arg.respond_to?(:value)

JSON.parse(arg)
end
Expand Down

0 comments on commit e042ce0

Please sign in to comment.