We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3477b6b commit 21ec855Copy full SHA for 21ec855
lib/os.js
@@ -26,7 +26,6 @@ const {
26
Float64Array,
27
NumberParseInt,
28
ObjectDefineProperties,
29
- StringPrototypeEndsWith,
30
StringPrototypeSlice,
31
SymbolToPrimitive,
32
} = primordials;
@@ -184,9 +183,9 @@ function tmpdir() {
184
183
process.env.TMP ||
185
(process.env.SystemRoot || process.env.windir) + '\\temp';
186
187
- if (path.length > 1 && StringPrototypeEndsWith(path, '\\') &&
188
- !StringPrototypeEndsWith(path, ':\\'))
+ if (path.length > 1 && path[path.length - 1] === '\\' && path[path.length - 2] !== ':') {
189
return StringPrototypeSlice(path, 0, -1);
+ }
190
191
return path;
192
}
0 commit comments