Skip to content

Commit

Permalink
handling empty data (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
Benji Visser committed Jul 23, 2021
1 parent 7a8ad9d commit a5e25fa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/generated.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ class Generated {
constructor(name, data){
this.name = name
this.extname = path.extname(name)
this.lines = data.toString().split("\n")
this.lines = (data == null) ? [] : data.toString().split("\n")
this._data = data
}

Expand Down

0 comments on commit a5e25fa

Please sign in to comment.