Skip to content

Commit

Permalink
Fix bug; assign nil to @index when instance variable is not found
Browse files Browse the repository at this point in the history
  • Loading branch information
makicamel committed Oct 9, 2023
1 parent 47af879 commit 4477c8c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/bulletmark_repairer/markers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def set_up
@instance_variable_name = line&.scan(/\b?(@[\w]+)\b?/)&.flatten&.last
end
end
@index = view_yield_index.negative? ? nil : "#{view_file}:#{view_yield_index}"
@index = @instance_variable_name ? "#{view_file}:#{view_yield_index}" : nil
else
# TODO: Ignore controllers list
# TODO: Allow directories list
Expand Down

0 comments on commit 4477c8c

Please sign in to comment.