Skip to content

Commit

Permalink
Disable fragment checks for SVGs (querySelectorAll not supported)
Browse files Browse the repository at this point in the history
  • Loading branch information
papandreou committed Mar 17, 2018
1 parent ead5172 commit 1cf94ef
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ module.exports = async function (options, t) {
at: relationDebugDescription(relation)
});
}
} else if (relation.to.type === 'Html' || relation.to.type === 'Svg') {
} else if (relation.to.type === 'Html') {
(relation.to.incomingFragments = relation.to.incomingFragments || []).push({
fragment,
relationDebugDescription: relationDebugDescription(relation),
Expand Down Expand Up @@ -372,7 +372,7 @@ module.exports = async function (options, t) {
}
}

if (asset.type === 'Html' || asset.type === 'Svg') {
if (asset.type === 'Html') {
// Remember the set of ids in the document before unloading so incoming fragments can be checked:
asset.ids = new Set();
for (const element of Array.from(asset.parseTree.querySelectorAll('[id]'))) {
Expand Down

0 comments on commit 1cf94ef

Please sign in to comment.