(cb)
| 124 | } |
| 125 | |
| 126 | function final(cb) { |
| 127 | if (typeof this._flush === 'function' && !this.destroyed) { |
| 128 | this._flush((er, data) => { |
| 129 | if (er) { |
| 130 | if (cb) { |
| 131 | cb(er); |
| 132 | } else { |
| 133 | this.destroy(er); |
| 134 | } |
| 135 | return; |
| 136 | } |
| 137 | |
| 138 | if (data != null) { |
| 139 | this.push(data); |
| 140 | } |
| 141 | this.push(null); |
| 142 | if (cb) { |
| 143 | cb(); |
| 144 | } |
| 145 | }); |
| 146 | } else { |
| 147 | this.push(null); |
| 148 | if (cb) { |
| 149 | cb(); |
| 150 | } |
| 151 | } |
| 152 | } |
| 153 | |
| 154 | function prefinish() { |
| 155 | if (this._final !== final) { |