Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

commercelayer

Package Overview
Dependencies
Maintainers
1
Versions
95
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

commercelayer - npm Package Compare versions

Comparing version 1.9.3 to 1.9.4

2

package.json
{
"name": "commercelayer",
"version": "1.9.3",
"version": "1.9.4",
"description": "The Official Commerce Layer JS library",

@@ -5,0 +5,0 @@ "main": "./src/main.js",

@@ -131,3 +131,3 @@ const config = require('./config')

createOrder: function() {
clsdk.createOrder({
return clsdk.createOrder({
type: 'orders',

@@ -141,5 +141,5 @@ shipping_country_code_lock: config.countryCode,

}
).then(data => {
utils.setOrderToken(data.get('token'))
return(data)
).then(response => {
utils.setOrderToken(response.dataset.data.attributes.token)
return(response.dataset.data)
})

@@ -167,3 +167,3 @@ },

document.dispatchEvent(new Event('clayer-order-ready'))
return response;
return response.dataset.data[0];
}

@@ -177,3 +177,3 @@ }

this.getOrder().then(function(order) {
if (order && order.get('status') == 'placed') {
if (order && order.attributes.status == 'placed') {
utils.deleteOrderToken()

@@ -180,0 +180,0 @@ ui.clearShoppingBag()

@@ -35,3 +35,3 @@ const ui = require('./ui')

api.createLineItem(order.get('id')[0], addToBag.dataset.skuId, addToBag.dataset.skuName, addToBag.dataset.skuReference, addToBag.dataset.skuImageUrl).then(function(lineItem){
api.createLineItem(order.id, addToBag.dataset.skuId, addToBag.dataset.skuName, addToBag.dataset.skuReference, addToBag.dataset.skuImageUrl).then(function(lineItem){
api.getOrder()

@@ -38,0 +38,0 @@ ui.openShoppingBag()

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc