Skip to content

Commit 52501c7

Browse files
committed
Fix #319: Nested properties
1 parent f556116 commit 52501c7

File tree

4 files changed

+24
-1
lines changed

4 files changed

+24
-1
lines changed

Diff for: lib/options/space-before-opening-brace.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ module.exports = (function() {
5454
whitespaceNode.content = value;
5555
} else if (value !== '') {
5656
var space = gonzales.createNode({ type: 'space', content: value });
57-
if (previousNode.is('atrulerq')) {
57+
if (previousNode && previousNode.is('atrulerq')) {
5858
previousNode.content.push(space);
5959
} else {
6060
node.insert(i, space);
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
@import '../../helpers/__helpers';
2+
3+
.funky {
4+
font: {
5+
family: fantasy;
6+
size: 30em;
7+
weight: bold;
8+
}
9+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
@import '../../helpers/__helpers';
2+
3+
.funky{
4+
font:{
5+
family: fantasy;
6+
size: 30em;
7+
weight: bold;
8+
}
9+
}

Diff for: test/options/space-before-opening-brace-scss/test.js

+5
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,9 @@ describe('options/space-before-opening-brace (scss):', function() {
33
this.comb.configure({ 'space-before-opening-brace': 1 });
44
this.shouldBeEqual('issue-231.scss', 'issue-231.expected.scss');
55
});
6+
7+
it('Issue 319', function() {
8+
this.comb.configure({ 'space-before-opening-brace': 1 });
9+
this.shouldBeEqual('issue-319.scss', 'issue-319.expected.scss');
10+
});
611
});

0 commit comments

Comments
 (0)