Make stemma data return consistent; refrain from assuming digraph in edit box. Fixes #28
[scpubgit/stemmaweb.git] / root / js / componentload.js
index 2a26927..3bb43a9 100644 (file)
@@ -396,8 +396,9 @@ $(document).ready( function() {
                                        // We received a stemma SVG string in return. 
                                        // Update the current stemma sequence number
                                        selectedStemmaID = data.stemmaid;
-                                       // Stash the answer in our SVG array
-                                       stemmata[selectedStemmaID] = data.stemmasvg;
+                                       delete data.stemmaid;
+                                       // Stash the answer in the appropriate spot in our stemma array
+                                       stemmata[selectedStemmaID] = data;
                                        // Display the new stemma
                                        load_stemma( selectedStemmaID );
                                        // Show the edit button, in case this was the first new stemma