Commit 8d00609ca175014e558cce251c9d6434c790739d
1 parent
92bd14f2
d.name bug
Showing
1 changed file
with
2 additions
and
2 deletions
datalets/datasetexplorer-datalet/js/buildtreemap2.js
... | ... | @@ -142,7 +142,7 @@ function build2(root, meta, place_holder, select_listener, width, height) { |
142 | 142 | var data = ["", d.name, d.color, "", "", d.value, ""]; |
143 | 143 | console.log(d); |
144 | 144 | data[2] = ["#000000"]; |
145 | - var id = d.name.split(':')[1]; | |
145 | + var id = (d.name) ? d.name.split(':')[1] : undefined; | |
146 | 146 | if (d.depth == 1) { |
147 | 147 | // FIRST LVL |
148 | 148 | data[0] = "first"; |
... | ... | @@ -272,7 +272,7 @@ function build2(root, meta, place_holder, select_listener, width, height) { |
272 | 272 | d.each(function(){ |
273 | 273 | var text = d3.select(this), |
274 | 274 | d = text[0][0].__data__, |
275 | - name = checkProviderName(d.name.trim()); | |
275 | + name = (d.name) ? checkProviderName(d.name.trim()) : ""; | |
276 | 276 | words = name.search(/\s+/) >= 0 ? name.split(/\s+/).reverse() : [name], |
277 | 277 | word = words.pop(), |
278 | 278 | line = [word], | ... | ... |