Skip to content

Commit f6a339d

Browse files
committed
Add let variable declarations
Needed for code consistency in tutorial
1 parent a29afcb commit f6a339d

File tree

1 file changed

+7
-7
lines changed
  • examples/online-store/plugins/entities/Product/harmonize/Harmonize Products/content

1 file changed

+7
-7
lines changed

examples/online-store/plugins/entities/Product/harmonize/Harmonize Products/content/content.sjs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88
* @return - your content
99
*/
1010
function createContent(id, options) {
11-
var doc = cts.doc(id);
12-
var root = doc.root.toObject();
11+
let doc = cts.doc(id);
12+
let root = doc.root.toObject();
1313

14-
var source;
14+
let source;
1515

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

43-
var sku = xs.string(source.sku || source.SKU);
44-
var title = xs.string(source.title);
45-
var price = xs.decimal(source.price);
43+
let sku = xs.string(source.sku || source.SKU);
44+
let title = xs.string(source.title);
45+
let price = xs.decimal(source.price);
4646

4747
// return the instance object
4848
return {

0 commit comments

Comments
 (0)