Permalink
Browse files

fail gracefully if no update notes

  • Loading branch information...
1 parent 75f265e commit 59f6656fff2b8207d309d5e4de2cb01ef4a2aca6 Justin Cooper committed Oct 4, 2012
Showing with 5 additions and 3 deletions.
  1. +5 −3 editor/helpers/updater.js
@@ -30,9 +30,11 @@ exports.check_for_updates = function check_for_updates(socket) {
} else {
has_update = false;
}
- request(update_notes, function (err, response, body) {
- socket.emit('editor-update-status', {has_update: has_update, version: version, url: update_url, notes: body});
- });
+ if (update_notes) {
+ request(update_notes, function (err, response, body) {
+ socket.emit('editor-update-status', {has_update: has_update, version: version, url: update_url, notes: body});
+ });
+ }
});
};

0 comments on commit 59f6656

Please sign in to comment.