Don't deprecate readyState, yet
This commit is contained in:
parent
ebe2721cbf
commit
04001fb591
@ -386,13 +386,8 @@ exports.createConnection = function (port, host) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
var readyStateMessage;
|
|
||||||
Object.defineProperty(Stream.prototype, 'readyState', {
|
Object.defineProperty(Stream.prototype, 'readyState', {
|
||||||
get: function () {
|
get: function () {
|
||||||
if (!readyStateMessage) {
|
|
||||||
readyStateMessage = 'readyState is depricated. Use stream.readable or stream.writable';
|
|
||||||
sys.error(readyStateMessage);
|
|
||||||
}
|
|
||||||
if (this._resolving) {
|
if (this._resolving) {
|
||||||
return 'opening';
|
return 'opening';
|
||||||
} else if (this.readable && this.writable) {
|
} else if (this.readable && this.writable) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user