Skip to content

Commit c37346d

Browse files
committed
refactor: check all falsy conditions of plugins and opts before returning NoWorkResult instance in process()
1 parent a0d9f10 commit c37346d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/processor.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,10 @@ class Processor {
4343

4444
process(css, opts = {}) {
4545
if (
46-
this.plugins.length === 0 &&
47-
typeof opts.parser === 'undefined' &&
48-
typeof opts.stringifier === 'undefined' &&
49-
typeof opts.syntax === 'undefined'
46+
!this.plugins.length &&
47+
!opts.parser &&
48+
!opts.stringifier &&
49+
!opts.syntax
5050
) {
5151
return new NoWorkResult(this, css, opts)
5252
} else {

0 commit comments

Comments
 (0)