Skip to content

Commit 562451d

Browse files
committed
Skip rdfParse if script content is empty
1 parent 0bbc061 commit 562451d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

reference/fetcher-classes.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ class XHTMLHandler {
112112
var scripts = this.dom.getElementsByTagName('script')
113113
for (var i = 0; i < scripts.length; i++) {
114114
var contentType = scripts[i].getAttribute('type')
115-
if (Parsable[contentType]) {
115+
if (Parsable[contentType] && scripts[i].textContent.trim().length) {
116116
rdfParse(scripts[i].textContent, kb, xhr.original.uri, contentType)
117117
}
118118
}

0 commit comments

Comments
 (0)