Skip to content

Commit e7e4505

Browse files
committed
Fix opts.from
1 parent 6c4cc35 commit e7e4505

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

index.js

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -49,16 +49,8 @@ function AtImport(options) {
4949
return function(styles, result) {
5050
const opts = assign({}, options || {})
5151
// auto add from option if possible
52-
if (
53-
!opts.from &&
54-
styles &&
55-
styles.nodes &&
56-
styles.nodes[0] &&
57-
styles.nodes[0].source &&
58-
styles.nodes[0].source.input &&
59-
styles.nodes[0].source.input.file
60-
) {
61-
opts.from = styles.nodes[0].source.input.file
52+
if (!opts.from && styles.source.input.file) {
53+
opts.from = styles.source.input.file
6254
}
6355

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

0 commit comments

Comments
 (0)