Skip to content

Commit 72f1a21

Browse files
tplookerdavidlehn
authored andcommitted
fix: linting
1 parent ee976d2 commit 72f1a21

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

lib/util.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ api.parseLinkHeader = header => {
130130
while((match = REGEX_LINK_HEADER_PARAMS.exec(params))) {
131131
result[match[1]] = (match[2] === undefined) ? match[3] : match[2];
132132
}
133-
const rel = result['rel'] || '';
133+
const rel = result.rel || '';
134134
if(Array.isArray(rval[rel])) {
135135
rval[rel].push(result);
136136
} else if(rval.hasOwnProperty(rel)) {

tests/test-common.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ function addManifest(manifest, parent) {
398398
*/
399399
function addTest(manifest, test, tests) {
400400
// expand @id and input base
401-
const test_id = test['@id'] || test['id'];
401+
const test_id = test['@id'] || test.id;
402402
//var number = test_id.substr(2);
403403
test['@id'] =
404404
manifest.baseIri +
@@ -958,10 +958,10 @@ function createDocumentLoader(test) {
958958
}
959959

960960
// If not JSON-LD, alternate may point there
961-
if(linkHeaders['alternate'] &&
962-
linkHeaders['alternate'].type == 'application/ld+json' &&
961+
if(linkHeaders.alternate &&
962+
linkHeaders.alternate.type == 'application/ld+json' &&
963963
!(contentType || '').match(/^application\/(\w*\+)?json$/)) {
964-
doc.documentUrl = prependBase(url, linkHeaders['alternate'].target);
964+
doc.documentUrl = prependBase(url, linkHeaders.alternate.target);
965965
}
966966
}
967967
}

0 commit comments

Comments
 (0)