Skip to content

Commit

Permalink
Use Promise.all so that we iterate through all notes until a rejectio…
Browse files Browse the repository at this point in the history
…n occurs.

h/t @beaucollins
  • Loading branch information
roundhill committed Feb 7, 2018
1 parent d56399e commit 5324686
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/dialogs/settings.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export const SettingsDialog = React.createClass({
getVersion(note.id, (e, v) => (e || v === 0 ? reject() : resolve()))
);

Promise.race(notes.map(noteHasSynced)).then(
Promise.all(notes.map(noteHasSynced)).then(
() => onSignOut(), // All good, sign out now!
() => this.showUnsyncedWarning() // Show a warning to the user
);
Expand Down

0 comments on commit 5324686

Please sign in to comment.