Skip to content

Commit 0c76b00

Browse files
gkelloggdlongley
andcommitted
Apply suggestions from @dlongley code review
Co-Authored-By: Dave Longley <[email protected]>
1 parent a556b66 commit 0c76b00

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

lib/documentLoaders/node.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ module.exports = ({
6868
// add any optional requestProfile
6969
if(options.requestProfile) {
7070
headers.Accept =
71-
headers.Accept + ", application/ld+json;profile=${options.requestProfile}";
71+
headers.Accept + `, application/ld+json;profile=${options.requestProfile}`;
7272
}
7373

7474
let result;

lib/documentLoaders/xhr.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ module.exports = ({
5252
// add any optional requestProfile
5353
if(options.requestProfile) {
5454
headers.Accept =
55-
headers.Accept + ", application/ld+json;profile=${options.requestProfile}";
55+
headers.Accept + `, application/ld+json;profile=${options.requestProfile}`;
5656
}
5757

5858
let req;

lib/jsonld.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -857,7 +857,7 @@ jsonld.documentLoader = async url => {
857857
* @param url the URL to fetch.
858858
* @param [options] the options to use:
859859
* [documentLoader] the document loader to use.
860-
* [extractAllScripts] concatenates all matching script elements..
860+
* [extractAllScripts] concatenates all matching script elements.
861861
* [profile] used when selecting from HTML script elements.
862862
* [requestProfile] one or more profile IRIs to use in the request.
863863
*
@@ -920,7 +920,7 @@ jsonld.get = async function(url, options) {
920920
}
921921
if(frag && remoteDoc.document.length === 0) {
922922
throw new JsonLdError(
923-
'No script tag found with id=${frag}.',
923+
`No script tag found with id=${frag}.`,
924924
'jsonld.InvalidScriptElement', {
925925
code: 'invalid script element',
926926
remoteDoc

0 commit comments

Comments
 (0)