Skip to content

Commit

Permalink
Smaller improvment
Browse files Browse the repository at this point in the history
  • Loading branch information
evangelion1204 committed Jul 6, 2015
1 parent 7b864a3 commit fe2c939
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/multi-ini-class.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ MultiIni = (function() {

MultiIni.prototype.read = function(filename) {
var lines;
if (filename == null) {
filename = {};
if (!filename) {
throw new Error('Missing filename.');
}
lines = this.fetchLines(filename);
return this.parser.parse(lines);
Expand Down
4 changes: 3 additions & 1 deletion src/multi-ini-class.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ class MultiIni
@parser = new Parser(@options)
@serializer = new Serializer(@options)

read: (filename = {}) ->
read: (filename) ->
throw new Error('Missing filename.') unless filename

lines = @fetchLines(filename)

return @parser.parse(lines)
Expand Down

0 comments on commit fe2c939

Please sign in to comment.