From 4f4db3b714d1e461c3d18a3dcceeb19f06da4814 Mon Sep 17 00:00:00 2001
From: Amanda Ghassaei <amandaghassaei@gmail.com>
Date: Tue, 3 Feb 2015 23:34:44 -0500
Subject: [PATCH] testing

---
 js/models/AppState.js | 2 +-
 js/models/Lattice.js  | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/js/models/AppState.js b/js/models/AppState.js
index c7f6c17a..e42ff88f 100644
--- a/js/models/AppState.js
+++ b/js/models/AppState.js
@@ -8,7 +8,7 @@
 AppState = Backbone.Model.extend({
 
     defaults: {
-        currentNav:"navDesign",//design, sim, assemble
+        currentNav:"navDesign",// design, sim, assemble
         currentTab:"lattice",
 
         //last tab that one open in each of the main menus
diff --git a/js/models/Lattice.js b/js/models/Lattice.js
index 35398388..d2504c5f 100644
--- a/js/models/Lattice.js
+++ b/js/models/Lattice.js
@@ -94,6 +94,7 @@ Lattice = Backbone.Model.extend({
     },
 
     removeCell: function(cell){
+        if (!cell) return;
         var index = this._subtract(cell.indices, this.get("cellsMin"));
         var cells = this.get("cells");
         cell.destroy();
-- 
GitLab