File tree 1 file changed +3
-2
lines changed
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -38,11 +38,11 @@ const {
38
38
ERR_METHOD_NOT_IMPLEMENTED ,
39
39
ERR_STREAM_UNSHIFT_AFTER_END_EVENT
40
40
} = require ( 'internal/errors' ) . codes ;
41
- const ReadableAsyncIterator = require ( 'internal/streams/async_iterator' ) ;
42
41
const { emitExperimentalWarning } = require ( 'internal/util' ) ;
43
42
44
43
// Lazy loaded to improve the startup performance.
45
44
let StringDecoder ;
45
+ let ReadableAsyncIterator ;
46
46
47
47
util . inherits ( Readable , Stream ) ;
48
48
@@ -988,7 +988,8 @@ Readable.prototype.wrap = function(stream) {
988
988
989
989
Readable . prototype [ Symbol . asyncIterator ] = function ( ) {
990
990
emitExperimentalWarning ( 'Readable[Symbol.asyncIterator]' ) ;
991
-
991
+ if ( ReadableAsyncIterator === undefined )
992
+ ReadableAsyncIterator = require ( 'internal/streams/async_iterator' ) ;
992
993
return new ReadableAsyncIterator ( this ) ;
993
994
} ;
994
995
You can’t perform that action at this time.
0 commit comments