Skip to content

Commit

Permalink
Add let variable declarations
Browse files Browse the repository at this point in the history
Needed for code consistency in tutorial
  • Loading branch information
wooldridge committed Apr 19, 2018
1 parent a29afcb commit f6a339d
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
* @return - your content
*/
function createContent(id, options) {
var doc = cts.doc(id);
var root = doc.root.toObject();
let doc = cts.doc(id);
let root = doc.root.toObject();

var source;
let source;

// for xml we need to use xpath
if (root && xdmp.nodeKind(root) === 'element') {
Expand All @@ -38,11 +38,11 @@ function createContent(id, options) {
*/
function extractInstanceProduct(source) {
// the original source documents
var attachments = source;
let attachments = source;

var sku = xs.string(source.sku || source.SKU);
var title = xs.string(source.title);
var price = xs.decimal(source.price);
let sku = xs.string(source.sku || source.SKU);
let title = xs.string(source.title);
let price = xs.decimal(source.price);

// return the instance object
return {
Expand Down

0 comments on commit f6a339d

Please sign in to comment.