Skip to content

Commit

Permalink
Update nrc-serializer-manager: Fixes aacerox#190
Browse files Browse the repository at this point in the history
nrc-serializer-manager.js:125:4 -> ReferenceError: xmlSerializer is not defined
  • Loading branch information
charlesponti authored Apr 13, 2018
1 parent 082c3ff commit 04b8a16
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/nrc-serializer-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,13 +113,15 @@ var BaseSerializer ={
}
};

// Create serializer
var xmlSerializer = new xmlserializer.Builder(this.options)

//add default serializer managers: JSON,XML and unknown content/type
serializerManager.add(Object.assign({
"name":"XML",
"options":{},
"contentTypes":["application/xml","application/xml;charset=utf-8","text/xml","text/xml;charset=utf-8"],
"xmlSerializer":new xmlserializer.Builder(this.options),
"xmlSerializer": xmlSerializer,
"serialize":function(data,nrcEventEmitter,serializedCallback){
if (typeof data === 'object')
data = xmlSerializer.buildObject(data);
Expand Down Expand Up @@ -182,4 +184,4 @@ serializerManager.add({

return serializerManager;

};
};

0 comments on commit 04b8a16

Please sign in to comment.