Skip to content

Commit

Permalink
Fix: incorrect check for responsiveValues length
Browse files Browse the repository at this point in the history
  • Loading branch information
smashercosmo committed Oct 6, 2017
1 parent df79c83 commit ab64a68
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,12 @@ module.exports = postcss.plugin(pkg.name, (options = {}) => {
.split(SPLIT_REGEXP)
.filter(Boolean)

if (!responsiveValues.length) return

const initialValue = comments
? decl.value
: responsiveValues.shift()

if (!responsiveValues.length) return

// responsiveValues without initial value
if (responsiveValues.length > breakpoints.length) {
throw new Error(
Expand Down

0 comments on commit ab64a68

Please sign in to comment.