| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 4b9914a commit 71b1c7f
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -77,12 +77,11 @@ class AsyncHook { | |||
| 77 | 77 | return this; | |
| 78 | 78 | ||
| 79 | 79 | const prev_kTotals = hook_fields[kTotals]; | |
| 80 | - hook_fields[kTotals] = 0; | ||
| 81 | 80 | ||
| 82 | 81 | // createHook() has already enforced that the callbacks are all functions, | |
| 83 | 82 | // so here simply increment the count of whether each callbacks exists or | |
| 84 | 83 | // not. | |
| 85 | - hook_fields[kTotals] += hook_fields[kInit] += +!!this[init_symbol]; | ||
| 84 | + hook_fields[kTotals] = hook_fields[kInit] += +!!this[init_symbol]; | ||
| 86 | 85 | hook_fields[kTotals] += hook_fields[kBefore] += +!!this[before_symbol]; | |
| 87 | 86 | hook_fields[kTotals] += hook_fields[kAfter] += +!!this[after_symbol]; | |
| 88 | 87 | hook_fields[kTotals] += hook_fields[kDestroy] += +!!this[destroy_symbol]; | |
@@ -105,9 +104,8 @@ class AsyncHook { | |||
| 105 | 104 | return this; | |
| 106 | 105 | ||
| 107 | 106 | const prev_kTotals = hook_fields[kTotals]; | |
| 108 | - hook_fields[kTotals] = 0; | ||
| 109 | 107 | ||
| 110 | - hook_fields[kTotals] += hook_fields[kInit] -= +!!this[init_symbol]; | ||
| 108 | + hook_fields[kTotals] = hook_fields[kInit] -= +!!this[init_symbol]; | ||
| 111 | 109 | hook_fields[kTotals] += hook_fields[kBefore] -= +!!this[before_symbol]; | |
| 112 | 110 | hook_fields[kTotals] += hook_fields[kAfter] -= +!!this[after_symbol]; | |
| 113 | 111 | hook_fields[kTotals] += hook_fields[kDestroy] -= +!!this[destroy_symbol]; | |
| Back | FazBrowse Home | New Git URL |
0 commit comments