Skip to content

Commit

Permalink
Downgrade: String.startsWith -> String.search
Browse files Browse the repository at this point in the history
node 0.12 doesn't support String.startsWith
  • Loading branch information
maltsev committed Feb 7, 2016
1 parent e5a4194 commit c001f22
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/modules/removeComments.es6
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ function isCommentToRemove(text, removeType) {
}

// https://en.wikipedia.org/wiki/Conditional_comment
const isConditional = text.startsWith('<!--[if');
const isConditional = text.search(/<!--\[if/) === 0;
if (removeType === 'safe' && isConditional) {
return false;
}
Expand Down

0 comments on commit c001f22

Please sign in to comment.