Skip to content

Commit 94d222b

Browse files
committed
Merge pull request #103 from postcss/simple-path
Simplify root node path
2 parents 6ad8005 + b4d24bb commit 94d222b

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

index.js

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,11 @@ function AtImport(options) {
4747
// auto add from option if possible
4848
if (
4949
!opts.from &&
50-
styles &&
51-
styles.nodes &&
52-
styles.nodes[0] &&
53-
styles.nodes[0].source &&
54-
styles.nodes[0].source.input &&
55-
styles.nodes[0].source.input.file
50+
styles.source &&
51+
styles.source.input &&
52+
styles.source.input.file
5653
) {
57-
opts.from = styles.nodes[0].source.input.file
54+
opts.from = styles.source.input.file
5855
}
5956

6057
// if from available, prepend from directory in the path array

0 commit comments

Comments
 (0)