Skip to content

Commit

Permalink
do not run hooks if we have none defined
Browse files Browse the repository at this point in the history
  • Loading branch information
duritong committed Nov 28, 2024
1 parent 24926fe commit 66a7422
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/trocla/hooks.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ def initialize(trocla)
end

def run(action, key, format, options)
return unless hooks[action]
hooks[action].each do |cmd|
Trocla::Hooks.send(cmd, trocla, key, format, options)
end
Expand Down

0 comments on commit 66a7422

Please sign in to comment.