Skip to content

Commit

Permalink
removeWindowsFragments: bail early if no StartFragment found
Browse files Browse the repository at this point in the history
  • Loading branch information
mcsf committed Jun 23, 2022
1 parent 03f76c0 commit 8826fdc
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,9 @@ function removeWindowsFragments( html ) {
const startIdx = html.indexOf( startStr );
if ( startIdx > -1 ) {
html = html.substring( startIdx + startStr.length );
} else {
// No point looking for EndFragment
return html;
}

const endStr = '<!--EndFragment-->';
Expand Down

0 comments on commit 8826fdc

Please sign in to comment.