From fd353911c54f9a27464eb04e21d76bca2c782755 Mon Sep 17 00:00:00 2001 From: Peter Cottle Date: Sat, 4 Apr 2015 11:42:56 -0700 Subject: [PATCH] OMG unstable finding bugs --- src/js/views/commandViews.js | 4 ++-- src/js/views/index.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/js/views/commandViews.js b/src/js/views/commandViews.js index 7abf9b15..494678e0 100644 --- a/src/js/views/commandViews.js +++ b/src/js/views/commandViews.js @@ -228,8 +228,8 @@ var CommandView = Backbone.View.extend({ // for changes that are just comestic, we actually only want to toggle classes // with jquery rather than brutally delete a html. doing so allows us // to nicely fade things - var changes = changeEvent.changes; - var changeKeys = _.keys(changes); + var changes = changeEvent.changes || {}; + var changeKeys = Object.keys(changes); if (_.difference(changeKeys, ['status']).length === 0) { this.updateStatus(); } else { diff --git a/src/js/views/index.js b/src/js/views/index.js index a738697c..dad028ed 100644 --- a/src/js/views/index.js +++ b/src/js/views/index.js @@ -328,7 +328,7 @@ var ModalAlert = ContainedBase.extend({ template: _.template($('#modal-alert-template').html()), initialize: function(options) { - options = options || {}; + this.options = options || {}; this.JSON = { title: options.title || 'Something to say', text: options.text || 'Here is a paragraph',