lib/scss_lint/linter/leading_zero.rb in scss-lint-0.26.0 vs lib/scss_lint/linter/leading_zero.rb in scss-lint-0.26.1
- old
+ new
@@ -12,10 +12,13 @@
check_number(node, number)
end
end
def visit_script_number(node)
- return unless number = source_from_range(node.source_range)[FRACTIONAL_DIGIT_REGEX, 1]
+ # TODO: Remove once https://github.com/sass/sass/issues/1343 is fixed
+ return unless source = source_from_range(node.source_range)
+
+ return unless number = source[FRACTIONAL_DIGIT_REGEX, 1]
check_number(node, number)
end
private