From 23543ac7adc7960a596c615fcf20936587d12964 Mon Sep 17 00:00:00 2001 From: Devin Howard Date: Sun, 7 Aug 2016 17:18:54 +0800 Subject: [PATCH] fix: synapse import fails if synapses are missing desc --- app/assets/javascripts/src/Metamaps.Import.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/assets/javascripts/src/Metamaps.Import.js b/app/assets/javascripts/src/Metamaps.Import.js index e82a05c5..c04a0f5b 100644 --- a/app/assets/javascripts/src/Metamaps.Import.js +++ b/app/assets/javascripts/src/Metamaps.Import.js @@ -272,7 +272,7 @@ Metamaps.Import = { name: name, metacode_id: metacode.id, permission: permission || Metamaps.Active.Map.get('permission'), - desc: desc, + desc: desc || "", link: link }) Metamaps.Topics.add(topic) @@ -292,7 +292,7 @@ Metamaps.Import = { Metamaps.Famous.viz.hideInstructions() }, - createSynapseWithParameters: function (description, category, permission, + createSynapseWithParameters: function (desc, category, permission, topic1, topic2) { var node1 = topic1.get('node') var node2 = topic2.get('node') @@ -303,7 +303,7 @@ Metamaps.Import = { } // if var synapse = new Metamaps.Backbone.Synapse({ - desc: description, + desc: desc || "", category: category, permission: permission, node1_id: topic1.id,