Skip to content
This repository has been archived by the owner on Dec 29, 2022. It is now read-only.

Commit

Permalink
Array.includes is node v6+ only
Browse files Browse the repository at this point in the history
It was being inserted by babel-runtime, which will go away in hydrolysis
  • Loading branch information
dfreedm committed Aug 10, 2016
1 parent 392c3fc commit 8a36a9f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.js
Expand Up @@ -231,10 +231,10 @@ function shadyShim(ast, style, elements) {

function addClass(node, className) {
const classList = getAttributeArray(node, 'class');
if (!classList.includes('style-scope')) {
if (classList.indexOf('style-scope') === -1) {
classList.push('style-scope');
}
if (!classList.includes(className)) {
if (classList.indexOf(className) === -1) {
classList.push(className);
}
dom5.setAttribute(node, 'class', classList.join(' '));
Expand Down

0 comments on commit 8a36a9f

Please sign in to comment.