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()
57
57
@collections_sent . each do |collection |
58
58
collection [ 'actions' ] . each do |action |
59
59
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
64
66
end
65
67
end
66
68
end
You can’t perform that action at this time.
0 commit comments