(stream, state, sync)
| 926 | } |
| 927 | |
| 928 | function finishMaybe(stream, state, sync) { |
| 929 | if (needFinish(state)) { |
| 930 | prefinish(stream, state); |
| 931 | if (state.pendingcb === 0) { |
| 932 | if (sync) { |
| 933 | state.pendingcb++; |
| 934 | process.nextTick((stream, state) => { |
| 935 | if (needFinish(state)) { |
| 936 | finish(stream, state); |
| 937 | } else { |
| 938 | state.pendingcb--; |
| 939 | } |
| 940 | }, stream, state); |
| 941 | } else if (needFinish(state)) { |
| 942 | state.pendingcb++; |
| 943 | finish(stream, state); |
| 944 | } |
| 945 | } |
| 946 | } |
| 947 | } |
| 948 | |
| 949 | function finish(stream, state) { |
| 950 | state.pendingcb--; |
no test coverage detected
searching dependent graphs…