# HG changeset patch # User cavaliet # Date 1397828524 -7200 # Node ID 36f40d5aa78657a52ea90446431dbbe2087691cb # Parent b75f68cc96ce58991464e1248dd0c28165dbf16d v0.5.5 js debug diff -r b75f68cc96ce -r 36f40d5aa786 src/spel/__init__.py --- a/src/spel/__init__.py Fri Apr 18 12:22:33 2014 +0200 +++ b/src/spel/__init__.py Fri Apr 18 15:42:04 2014 +0200 @@ -1,4 +1,4 @@ -VERSION = (0, 5, 4, "final", 0) +VERSION = (0, 5, 5, "final", 0) VERSION_STR = unicode(".".join(map(lambda i:"%02d" % (i,), VERSION[:2]))) diff -r b75f68cc96ce -r 36f40d5aa786 src/spel/static/spel/metadataplayer/spel-serializer.js --- a/src/spel/static/spel/metadataplayer/spel-serializer.js Fri Apr 18 12:22:33 2014 +0200 +++ b/src/spel/static/spel/metadataplayer/spel-serializer.js Fri Apr 18 15:42:04 2014 +0200 @@ -33,17 +33,19 @@ function shortenText(_text, _maxlength) { return (_text.length > _maxlength ? (_text.substr(0,_maxlength) + '…') : _text); } - switch (typeof _data.content.data) { - case "object": - _res.description = IriSP._(_data.content.data).map(function(v, k) { - return k + ": " + v; - }).join("\n"); - _res.title = shortenText(_data.content.data.titre || _data.content.data.ref_text || "", 40); - break; - case "string": - _res.description = _data.content.data; - _res.title = shortenText(_data.content.data, 40); - break; + if(("content" in _data) && ("data" in _data.content)){ + switch (typeof _data.content.data) { + case "object": + _res.description = IriSP._(_data.content.data).map(function(v, k) { + return k + ": " + v; + }).join("\n"); + _res.title = shortenText(_data.content.data.titre || _data.content.data.ref_text || "", 40); + break; + case "string": + _res.description = _data.content.data; + _res.title = shortenText(_data.content.data, 40); + break; + } } switch (_data.type) { case "performance":