diff -r 3f83194517bf -r 7a6450d251fc src/js/data.js --- a/src/js/data.js Thu Nov 03 13:07:33 2011 +0100 +++ b/src/js/data.js Thu Nov 03 13:08:32 2011 +0100 @@ -46,6 +46,11 @@ /* This function returns serializer set-up with the correct configuration - takes a metadata struct describing the metadata source */ + + if (metadataOptions === undefined) + /* return an empty serializer */ + return IriSP.Serializer("", ""); + switch(metadataOptions.type) { case "json": return new IriSP.JSONSerializer(this._dataloader, metadataOptions.src); @@ -54,8 +59,12 @@ case "dummy": /* only used for unit testing - not defined in production */ return new IriSP.MockSerializer(this._dataloader, metadataOptions.src); break; + + case "empty": + return new IriSP.Serializer("", "empty"); + break; - default: + default: return undefined; } };