Skip to content
This repository was archived by the owner on Feb 18, 2022. It is now read-only.

Commit 6c37dc9

Browse files
committed
Fix dir option
1 parent 5b49b7c commit 6c37dc9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ const transforms = {
4444
// plugin
4545
export default postcss.plugin('postcss-logical-properties', opts => {
4646
const preserve = Boolean(Object(opts).preserve);
47-
const dir = !preserve && 'dir' in Object(opts)
48-
? /^rtl$/i.test(Object(opts).dir)
47+
const dir = !preserve && typeof Object(opts).dir === 'string'
48+
? /^rtl$/i.test(opts.dir)
4949
? 'rtl'
5050
: 'ltr'
5151
: false;

0 commit comments

Comments
 (0)