| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 99858ce commit a37e5fe
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -163,6 +163,7 @@ let ReadStream; | |||
| 163 | 163 | let WriteStream; | |
| 164 | 164 | let rimraf; | |
| 165 | 165 | let kResistStopPropagation; | |
| 166 | + let ReadFileContext; | ||
| 166 | 167 | ||
| 167 | 168 | // These have to be separate because of how graceful-fs happens to do it's | |
| 168 | 169 | // monkeypatching. | |
@@ -364,7 +365,7 @@ function readFile(path, options, callback) { | |||
| 364 | 365 | callback ||= options; | |
| 365 | 366 | validateFunction(callback, 'cb'); | |
| 366 | 367 | options = getOptions(options, { flag: 'r' }); | |
| 367 | - const ReadFileContext = require('internal/fs/read/context'); | ||
| 368 | + ReadFileContext ??= require('internal/fs/read/context'); | ||
| 368 | 369 | const context = new ReadFileContext(callback, options.encoding); | |
| 369 | 370 | context.isUserFd = isFd(path); // File descriptor ownership | |
| 370 | 371 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments