parent
							
								
									6ae640755f
								
							
						
					
					
						commit
						ea57ef78da
					
				|  | @ -91,11 +91,8 @@ module Jekyll | ||||||
|     # interface for Jekyll core components to trigger hooks |     # interface for Jekyll core components to trigger hooks | ||||||
|     def self.trigger(owner, event, *args) |     def self.trigger(owner, event, *args) | ||||||
|       # proceed only if there are hooks to call |       # proceed only if there are hooks to call | ||||||
|       return unless @registry[owner] |       hooks = @registry.dig(owner, event) | ||||||
|       return unless @registry[owner][event] |       return if hooks.nil? || hooks.empty? | ||||||
| 
 |  | ||||||
|       # hooks to call for this owner and event |  | ||||||
|       hooks = @registry[owner][event] |  | ||||||
| 
 | 
 | ||||||
|       # sort and call hooks according to priority and load order |       # sort and call hooks according to priority and load order | ||||||
|       hooks.sort_by { |h| @hook_priority[h] }.each do |hook| |       hooks.sort_by { |h| @hook_priority[h] }.each do |hook| | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue