We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 66a2092 commit 11b68b9Copy full SHA for 11b68b9
1 file changed
lib/jsonld.js
@@ -940,6 +940,14 @@ jsonld.get = async function(url, options) {
940
});
941
}
942
if(frag || !options.extractAllScripts) {
943
+ if(!remoteDoc.document[0]) {
944
+ throw new JsonLdError(
945
+ `No script tag found.`,
946
+ 'jsonld.InvalidScriptElement', {
947
+ code: 'loading document failed',
948
+ remoteDoc
949
+ });
950
+ }
951
remoteDoc.document = remoteDoc.document[0];
952
953
} else {
0 commit comments