From f7118be1d4860b90123248241f208548b440247b Mon Sep 17 00:00:00 2001
From: Amanda Ghassaei <amandaghassaei@gmail.com>
Date: Wed, 11 Mar 2015 01:43:15 -0400
Subject: [PATCH] don't save parts unless we have to

---
 js/fea/DmaCell.js | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/js/fea/DmaCell.js b/js/fea/DmaCell.js
index 2e2a1ca6..fb04ff96 100644
--- a/js/fea/DmaCell.js
+++ b/js/fea/DmaCell.js
@@ -194,11 +194,11 @@ DMACell.prototype.destroy = function(){
 };
 
 DMACell.prototype.toJSON = function(){
-    if (!this.parts) this.parts = this._initParts();
-    return {
-        indices:this.indices,//todo get rid of this and calculate from min and max
-        parts: this.parts
+    var data = {
+        indices:this.indices//todo get rid of this and calculate from min and max
     };
+    if (this.parts) data.parts = this.parts;
+    return data;
 };
 
 ///////////////////////////////////////////////////////////////////////////////////////////////
-- 
GitLab