File tree Expand file tree Collapse file tree 3 files changed +11
-1
lines changed
Expand file tree Collapse file tree 3 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -346,8 +346,11 @@ class Comb {
346346 let filename = options && options . filename || '' ;
347347 let context = options && options . context ;
348348 let tree ;
349+ const lint = this . lint ;
349350
350- if ( ! text ) return this . lint ? [ ] : text ;
351+ if ( ! text ) return new Promise ( function ( resolve ) {
352+ resolve ( lint ? [ ] : text ) ;
353+ } ) ;
351354
352355 if ( ! syntax ) syntax = 'css' ;
353356 this . syntax = syntax ;
Original file line number Diff line number Diff line change @@ -169,6 +169,13 @@ describe('scss', function() {
169169 return test . shouldBeEqual ( 'content.scss' ) ;
170170 } ) ;
171171
172+ it ( 'Should parse an empty file' , function ( ) {
173+ let test = new Test ( this ) ;
174+ test . comb . configure ( { } ) ;
175+
176+ return test . shouldBeEqual ( 'empty.scss' ) ;
177+ } ) ;
178+
172179 it ( 'Should parse functions' , function ( ) {
173180 let test = new Test ( this ) ;
174181 test . comb . configure ( { } ) ;
You can’t perform that action at this time.
0 commit comments