As per our discussion, your JS file content should be like this:
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
define([
'uiComponent'
], function (Component) {
'use strict';
return Component.extend({
defaults: {
template: 'Magento_Checkout/summary/item/details'
},
/**
* @param {Object} quoteItem
* @return {String}
*/
quoteItemData: function () {
return window.checkoutConfig.quoteItemData;
},
getValue: function(quoteItem) {
return quoteItem.name;
},
getItemTag: function(quoteItem) {
var itemProduct = this.getItemProduct(quoteItem.item_id);
return itemProduct.new;
},
getItemProduct: function(item_id) {
var itemElement = null;
_.each(this.quoteItemData, function(element, index) {
if (element.item_id == item_id) {
itemElement = element;
}
});
return itemElement;
}
});
});