Skip to content

Commit 08dffd3

Browse files
committed
simplify logic
1 parent 9f298b2 commit 08dffd3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docusaurus.config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -308,11 +308,11 @@ module.exports = {
308308
const apiMethods = ['GET', 'POST', 'PUT', 'DELETE', 'PATCH', 'HEAD', 'OPTIONS'];
309309
const splitValueLines = node.value.trim().split('\n');
310310

311-
splitValueLines.forEach((item, i, valuesArray) => {
311+
splitValueLines.forEach((item, i) => {
312312
if (apiMethods.some((method) => item.trim() === method)) {
313313
// try to parse as URL, if successful, prefix with absolute URL
314314
try {
315-
const parsedUrl = parse(valuesArray[i + 1]);
315+
const parsedUrl = parse(splitValueLines[i + 1]);
316316
if (isInternal(parsedUrl, config.absoluteUrl) && parsedUrl.pathname) {
317317
if (splitValueLines[i + 1]) splitValueLines[i + 1] = `https://api.apify.com${parsedUrl.pathname}`;
318318
}

0 commit comments

Comments
 (0)