Skip to content

Commit

Permalink
Merge pull request #19 from yogeshjain999/fix/focusable-error
Browse files Browse the repository at this point in the history
Don't use Hash#compact
  • Loading branch information
yogeshjain999 authored Mar 26, 2020
2 parents 6123495 + a4b274c commit 61a1fe0
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/trailblazer/developer/trace/focusable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,12 @@ def capture_variables_from(ctx, focus_on:, inspector: Trace::Inspector, **flow_o
# message: "WTF!"
# seq: [:a]
def tree_nodes_for(level, input:, output:, **options)
input_output_nodes = { Input: input, Output: output }.compact.collect do |table_header, entity|
# TODO: Reverting `Hash#compact` usage as it is not supported in Ruby <= 2.4
# Once the support is droped, revert actual code with below and remove entity check.
# input_output_nodes = { Input: input, Output: output }.compact.collect do |table_header, entity|

input_output_nodes = { Input: input, Output: output }.collect do |table_header, entity|
next unless entity
next unless Array( entity.data[:focused_variables] ).any?

table = vertical_table_for(entity.data[:focused_variables], table_header: table_header)
Expand Down

0 comments on commit 61a1fe0

Please sign in to comment.