dist/sofa.js
function (products, categoryUrlId) {
        return products.map(function (product) {
            product.categoryUrlId = categoryUrlId;
            // the backend is sending us prices as strings.
            // we need to fix that up for sorting and other things to work
            product.price = parseFloat(product.price, 10);
            return sofa.Util.extend(new sofa.models.Product(), product);
        });
    }
function (products, categoryUrlId) {
        return products.map(function (product) {
            product.categoryUrlId = categoryUrlId;
            // the backend is sending us prices as strings.
            // we need to fix that up for sorting and other things to work
            product.price = parseFloat(product.price, 10);
            return sofa.Util.extend(new sofa.models.Product(), product);
        });
    }
function ( products , categoryUrlId ) { return products . map ( function ( product ) { product . categoryUrlId = categoryUrlId ; // the backend is sending us prices as strings. // we need to fix that up for sorting and other things to work product . price = parseFloat ( product . price , 10 ) ; return sofa . Util . extend ( new sofa . models . Product ( ) , product ) ; } ) ; }
it's a bit akward that we need to do that. It should be adressed directly on our server API so that this extra processing can be removed.
it s a bit akward that we need to do that . It should be adressed directly on our server API so that this extra processing can be removed .