diff -r 7e5174fe9816 -r 5b7d7ab6baff web/res/metadataplayer/Tagcloud.js
--- a/web/res/metadataplayer/Tagcloud.js Mon May 21 18:53:02 2012 +0200
+++ b/web/res/metadataplayer/Tagcloud.js Tue May 22 16:47:35 2012 +0200
@@ -7,7 +7,7 @@
IriSP.Widgets.Tagcloud.prototype.template =
'
'
- + '{{#words}}- {{word}}
{{/words}}'
+ + '{{#words}}- {{word}}
{{/words}}'
+ '
';
IriSP.Widgets.Tagcloud.prototype.defaults = {
@@ -66,6 +66,9 @@
})
.first(this.tag_count)
.value();
+ if (!_words.length) {
+ return;
+ }
var _max = _words[0].count,
_min = Math.min(_words[_words.length - 1].count, _max - 1),
_scale = (this.max_font_size - this.min_font_size) / Math.sqrt(_max - _min);