File tree Expand file tree Collapse file tree 3 files changed +5
-3
lines changed Expand file tree Collapse file tree 3 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -156,6 +156,8 @@ function validate(doc, options) {
156156
157157 return lang . slice ( 0 , 2 ) . toLowerCase ( ) ;
158158 } ) ;
159+ } else {
160+ doc . langs = [ 'en' ] ;
159161 }
160162
161163 if ( doc . categories ) {
Original file line number Diff line number Diff line change 11{
22 "name" : " dev-blog-directory-save" ,
3- "version" : " 0.4.4 " ,
3+ "version" : " 0.4.5 " ,
44 "description" : " API for save new blogs to dev-blog-directory." ,
55 "main" : " lib/index.js" ,
66 "scripts" : {
Original file line number Diff line number Diff line change @@ -292,7 +292,7 @@ describe('dev-blog-directory-save', () => {
292292 url : 'https://example.com/'
293293 } ;
294294 expect ( validate ( doc ) ) . to . be . eql ( true ) ;
295- expect ( doc . langs ) . to . be . an ( 'undefined' ) ;
295+ expect ( doc . langs ) . to . be . eql ( [ 'en' ] ) ;
296296 } ) ;
297297
298298 it ( 'should be \'\'' , ( ) => {
@@ -301,7 +301,7 @@ describe('dev-blog-directory-save', () => {
301301 langs : ''
302302 } ;
303303 expect ( validate ( doc ) ) . to . be . eql ( true ) ;
304- expect ( doc . langs ) . to . be . eql ( '' ) ;
304+ expect ( doc . langs ) . to . be . eql ( [ 'en' ] ) ;
305305 } ) ;
306306
307307 it ( 'should be an array' , ( ) => {
You can’t perform that action at this time.
0 commit comments