From ad15f49939d87113a60e495b757e2418587b2476 Mon Sep 17 00:00:00 2001 From: rickyes Date: Sat, 18 Apr 2020 14:24:46 +0800 Subject: [PATCH] perf_hooks: remove unnecessary assignment when name is undefined MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/32910 Reviewed-By: Michaƫl Zasso Reviewed-By: Zeyu Yang Reviewed-By: Andrey Pechkurov Reviewed-By: Colin Ihrig Reviewed-By: Chengzhong Wu Reviewed-By: Luigi Pinca Reviewed-By: James M Snell --- lib/perf_hooks.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/perf_hooks.js b/lib/perf_hooks.js index 11a9b5eba6a343..efc92ca8c4aee4 100644 --- a/lib/perf_hooks.js +++ b/lib/perf_hooks.js @@ -407,8 +407,8 @@ class Performance { } clearMarks(name) { - name = name !== undefined ? `${name}` : name; if (name !== undefined) { + name = `${name}`; this[kIndex][kMarks].delete(name); _clearMark(name); } else {