File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -57,10 +57,12 @@ def generate_action_hooks()
5757 @collections_sent . each do |collection |
5858 collection [ 'actions' ] . each do |action |
5959 c = get_collection ( collection [ 'name' ] )
60- a = get_action ( c , action [ 'name' ] )
61- load = !a . hooks . nil? && a . hooks . key? ( :load ) && a . hooks [ :load ] . is_a? ( Proc )
62- change = !a . hooks . nil? && a . hooks . key? ( :change ) && a . hooks [ :change ] . is_a? ( Hash ) ? a . hooks [ :change ] . keys : [ ]
63- action [ 'hooks' ] = { 'load' => load , 'change' => change }
60+ unless c . nil?
61+ a = get_action ( c , action [ 'name' ] )
62+ load = !a . hooks . nil? && a . hooks . key? ( :load ) && a . hooks [ :load ] . is_a? ( Proc )
63+ change = !a . hooks . nil? && a . hooks . key? ( :change ) && a . hooks [ :change ] . is_a? ( Hash ) ? a . hooks [ :change ] . keys : [ ]
64+ action [ 'hooks' ] = { 'load' => load , 'change' => change }
65+ end
6466 end
6567 end
6668 end
You can’t perform that action at this time.
0 commit comments