Skip to content

Commit

Permalink
Fixes #60
Browse files Browse the repository at this point in the history
  • Loading branch information
wesleytodd committed Apr 14, 2017
1 parent eb88021 commit 2c3b30d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/set.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ MigrationSet.prototype.load = function (fn) {
this.emit('load')
fs.readFile(this.path, 'utf8', function (err, json) {
if (err) return fn(err)
if (!json || json === '') {
return fn(null, this)
}
try {
fn(null, JSON.parse(json))
} catch (err) {
Expand Down

0 comments on commit 2c3b30d

Please sign in to comment.