Skip to content

Commit

Permalink
refactor: check all falsy conditions of plugins and opts before retur…
Browse files Browse the repository at this point in the history
…ning NoWorkResult instance in process()
  • Loading branch information
ahmdammarr committed Dec 29, 2023
1 parent a0d9f10 commit c37346d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/processor.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ class Processor {

process(css, opts = {}) {
if (
this.plugins.length === 0 &&
typeof opts.parser === 'undefined' &&
typeof opts.stringifier === 'undefined' &&
typeof opts.syntax === 'undefined'
!this.plugins.length &&
!opts.parser &&
!opts.stringifier &&
!opts.syntax
) {
return new NoWorkResult(this, css, opts)
} else {
Expand Down

0 comments on commit c37346d

Please sign in to comment.