Skip to content

Commit

Permalink
🐛 Fix false positive in border-zero
Browse files Browse the repository at this point in the history
This fixes a false positive when `convention` is set to the integer `0` (as opposed to the string, which does work), by casting the `convention` to a string.

Fixes sasstools#861
  • Loading branch information
richarddewit authored and bgriffith committed Oct 26, 2016
1 parent 8a3f293 commit 3aada68
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rules/border-zero.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ module.exports = {
var node = item.content[0];
if (node.type === 'number' || node.type === 'ident') {
if (node.content === '0' || node.content === 'none') {
if (parser.options.convention !== node.content) {
if (('' + parser.options.convention) !== node.content) {
result = helpers.addUnique(result, {
'ruleId': parser.rule.name,
'line': node.start.line,
Expand Down

0 comments on commit 3aada68

Please sign in to comment.