From 141a6e34eed05577edf43ad085a74f330d0559cb Mon Sep 17 00:00:00 2001 From: Michaƫl Zasso Date: Sat, 23 Nov 2019 10:09:05 +0100 Subject: lib: enforce use of Array from primordials PR-URL: https://github.com/nodejs/node/pull/30635 Reviewed-By: Colin Ihrig Reviewed-By: James M Snell Reviewed-By: Joyee Cheung --- lib/internal/tls.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/internal/tls.js') diff --git a/lib/internal/tls.js b/lib/internal/tls.js index ee43801638..d7370ad52c 100644 --- a/lib/internal/tls.js +++ b/lib/internal/tls.js @@ -1,6 +1,7 @@ 'use strict'; const { + ArrayIsArray, ObjectCreate, } = primordials; @@ -15,7 +16,7 @@ function parseCertString(s) { const key = parts[i].slice(0, sepIndex); const value = parts[i].slice(sepIndex + 1); if (key in out) { - if (!Array.isArray(out[key])) { + if (!ArrayIsArray(out[key])) { out[key] = [out[key]]; } out[key].push(value); -- cgit v1.2.3