Skip to content
This repository has been archived by the owner on Feb 14, 2020. It is now read-only.

Commit

Permalink
all applied migrations on initial migration are new
Browse files Browse the repository at this point in the history
on the initial run, there are no previous entries. this pr sets
newEntries to match all applied entries in this case, which
fixes gh-2
  • Loading branch information
Tyler Kellen committed Aug 24, 2015
1 parent 34c82cb commit 2341cb9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/command/apply.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export default function apply(config: Config) {

let previousEntry = journal.then(es => R.last(es));
let newEntries = Promise.join(previousEntry, apply, (prev, es) =>
R.filter(e => e.timestamp > prev.timestamp, es)
prev ? R.filter(e => e.timestamp > prev.timestamp, es) : apply
);

return newEntries
Expand Down

0 comments on commit 2341cb9

Please sign in to comment.