| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -282,8 +282,8 @@ let showExistsDeprecation = true; | |||
| 282 | 282 | function existsSync(path) { | |
| 283 | 283 | try { | |
| 284 | 284 | path = getValidatedPath(path); | |
| 285 | - } catch { | ||
| 286 | - if (showExistsDeprecation) { | ||
| 285 | + } catch (err) { | ||
| 286 | + if (showExistsDeprecation && err?.code === 'ERR_INVALID_ARG_TYPE') { | ||
| 287 | 287 | process.emitWarning( | |
| 288 | 288 | 'Passing invalid argument types to fs.existsSync is deprecated', 'DeprecationWarning', 'DEP0187', | |
| 289 | 289 | ); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments