diff options
author | cjihrig <cjihrig@gmail.com> | 2019-06-10 21:19:44 -0700 |
---|---|---|
committer | ZYSzys <zyszys98@gmail.com> | 2019-06-16 16:45:15 +0800 |
commit | 2b8b23067d4211014dd192e6ef774178725c9209 (patch) | |
tree | 57372d90c623e9bc41b0129b91f40ca72902e95a /lib/trace_events.js | |
parent | 2b7dfbcdbe2ce32be7d3bd5ba007ad447c75ae8f (diff) | |
download | node-new-2b8b23067d4211014dd192e6ef774178725c9209.tar.gz |
perf_hooks,trace_events: use stricter equality
There is no need to use loose equality on these checks because
undefined is caught by the preceding typeof check.
PR-URL: https://github.com/nodejs/node/pull/28166
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Diffstat (limited to 'lib/trace_events.js')
-rw-r--r-- | lib/trace_events.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/trace_events.js b/lib/trace_events.js index 0d533c76a7..f142afded1 100644 --- a/lib/trace_events.js +++ b/lib/trace_events.js @@ -73,7 +73,7 @@ class Tracing { } function createTracing(options) { - if (typeof options !== 'object' || options == null) + if (typeof options !== 'object' || options === null) throw new ERR_INVALID_ARG_TYPE('options', 'object', options); if (!Array.isArray(options.categories)) { |