Skip to content
This repository was archived by the owner on Dec 21, 2021. It is now read-only.

Commit ace8303

Browse files
committed
Improve how options are utilized
1 parent 7a2d1a2 commit ace8303

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const selectorParser = require('postcss-selector-parser');
66
// plugin
77
module.exports = postcss.plugin('postcss-dir-pseudo-class', (opts) => (root) => {
88
// client browser list
9-
const clientBrowserList = browserslist(opts && opts.browsers, {
9+
const clientBrowserList = browserslist(Object(opts).browsers, {
1010
path: root.source && root.source.input && root.source.input.file
1111
});
1212

@@ -63,8 +63,8 @@ module.exports = postcss.plugin('postcss-dir-pseudo-class', (opts) => (root) =>
6363
// value of the :dir pseudo-class
6464
const value = node.nodes.toString();
6565

66-
// whether that value matches the presumed direction
67-
const isdir = opts && Object(opts).dir === value;
66+
// whether :dir matches the presumed direction
67+
const isdir = Object(opts).dir === value;
6868

6969
// [dir] attribute
7070
const dirAttr = selectorParser.attribute({

0 commit comments

Comments
 (0)