indexOf() instead of includes()

This commit is contained in:
quentin
2017-02-20 15:42:50 -05:00
parent 5658256715
commit de707c185e
4 changed files with 8 additions and 8 deletions

View File

@@ -25,7 +25,7 @@ const transformersForHtmlJS = {
name: 'add-loop-protect',
transformer: function addLoopProtect(file) {
const _contents = file.contents.toLowerCase();
if (file.ext === 'html' && !_contents.includes('<script>')) {
if (file.ext === 'html' && _contents.indexOf('<script>') === -1) {
// No JavaScript in user code, so no need for loopProtect
return updateContents(file.contents, file);
}