From cf63c2484bd89d6f075b29ea8d9c0ae59d5f4089 Mon Sep 17 00:00:00 2001 From: LiviaMedeiros Date: Thu, 20 Jul 2023 16:14:31 +0800 Subject: [PATCH] squash: adjust .at() --- lib/internal/fs/utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/internal/fs/utils.js b/lib/internal/fs/utils.js index 230b7e68af8cee..b7354e30e9a6eb 100644 --- a/lib/internal/fs/utils.js +++ b/lib/internal/fs/utils.js @@ -752,7 +752,7 @@ function warnOnNonPortableTemplate(template) { // end with 'X' because they are handled inconsistently across platforms. if (nonPortableTemplateWarn && ((typeof template === 'string' && StringPrototypeEndsWith(template, 'X')) || - TypedArrayPrototypeAt(template, -1) === 0x58)) { + (typeof template !== 'string' && TypedArrayPrototypeAt(template, -1) === 0x58))) { process.emitWarning('mkdtemp() templates ending with X are not portable. ' + 'For details see: https://nodejs.org/api/fs.html'); nonPortableTemplateWarn = false;