| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent e451ec9 commit 7d127d2
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1187,8 +1187,11 @@ ObjectDefineProperties(Readable.prototype, { | |||
| 1187 | 1187 | readableAborted: { | |
| 1188 | 1188 | enumerable: false, | |
| 1189 | 1189 | get: function() { | |
| 1190 | - return !!(this._readableState.destroyed || this._readableState.errored) && | ||
| 1191 | - !this._readableState.endEmitted; | ||
| 1190 | + return !!( | ||
| 1191 | + this._readableState.readable !== false && | ||
| 1192 | + (this._readableState.destroyed || this._readableState.errored) && | ||
| 1193 | + !this._readableState.endEmitted | ||
| 1194 | + ); | ||
| 1192 | 1195 | } | |
| 1193 | 1196 | }, | |
| 1194 | 1197 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -2,7 +2,7 @@ | |||
| 2 | 2 | ||
| 3 | 3 | const common = require('../common'); | |
| 4 | 4 | const assert = require('assert'); | |
| 5 | - const { Readable } = require('stream'); | ||
| 5 | + const { Readable, Duplex } = require('stream'); | ||
| 6 | 6 | ||
| 7 | 7 | { | |
| 8 | 8 | const readable = new Readable({ | |
@@ -55,3 +55,12 @@ const { Readable } = require('stream'); | |||
| 55 | 55 | })); | |
| 56 | 56 | readable.resume(); | |
| 57 | 57 | } | |
| 58 | + | ||
| 59 | + { | ||
| 60 | + const duplex = new Duplex({ | ||
| 61 | + readable: false, | ||
| 62 | + write() {} | ||
| 63 | + }); | ||
| 64 | + duplex.destroy(); | ||
| 65 | + assert.strictEqual(duplex.readableAborted, false); | ||
| 66 | + } | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments