Skip to content

Commit c983dcd

Browse files
committed
url: array length instead of ArrayPrototypeAt
1 parent 9d1ce0a commit c983dcd

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lib/url.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
'use strict';
2323

2424
const {
25-
ArrayPrototypeAt,
2625
ArrayPrototypeJoin,
2726
Boolean,
2827
Int8Array,
@@ -922,7 +921,7 @@ Url.prototype.resolveObject = function resolveObject(relative) {
922921
// If a url ENDs in . or .., then it must get a trailing slash.
923922
// however, if it ends in anything else non-slashy,
924923
// then it must NOT get a trailing slash.
925-
let last = ArrayPrototypeAt(srcPath, -1);
924+
let last = srcPath[srcPath.length - 1];
926925
const hasTrailingSlash = (
927926
((result.host || relative.host || srcPath.length > 1) &&
928927
(last === '.' || last === '..')) || last === '');

0 commit comments

Comments
 (0)