Socket
Socket
Sign inDemoInstall

@vtex/order-items

Package Overview
Dependencies
7
Maintainers
53
Versions
28
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.6.6 to 0.6.7

10

dist/index.esm.js
/*!
* @vtex/order-items v0.6.6
* @vtex/order-items v0.6.7
* (c) VTEX

@@ -102,3 +102,3 @@ * Released under the MIT License.

const isSameItem = (input, item, items) => {
var _a, _b;
var _a, _b, _c;
const isSameId = ((_a = input.id) === null || _a === void 0 ? void 0 : _a.toString()) === item.id;

@@ -114,5 +114,5 @@ const isSameSeller = input.seller === item.seller;

// input has no options
if (input.options == null) {
// and the comparing item has, not the same item
if ((_b = item.options) === null || _b === void 0 ? void 0 : _b.length) {
if (input.options == null || !((_b = input.options) === null || _b === void 0 ? void 0 : _b.length)) {
// and the comparing item has attachments, not the same item
if ((_c = item.attachments) === null || _c === void 0 ? void 0 : _c.length) {
return false;

@@ -119,0 +119,0 @@ }

/*!
* @vtex/order-items v0.6.6
* @vtex/order-items v0.6.7
* (c) VTEX

@@ -131,3 +131,3 @@ * Released under the MIT License.

const isSameItem = (input, item, items) => {
var _a, _b;
var _a, _b, _c;
const isSameId = ((_a = input.id) === null || _a === void 0 ? void 0 : _a.toString()) === item.id;

@@ -143,5 +143,5 @@ const isSameSeller = input.seller === item.seller;

// input has no options
if (input.options == null) {
// and the comparing item has, not the same item
if ((_b = item.options) === null || _b === void 0 ? void 0 : _b.length) {
if (input.options == null || !((_b = input.options) === null || _b === void 0 ? void 0 : _b.length)) {
// and the comparing item has attachments, not the same item
if ((_c = item.attachments) === null || _c === void 0 ? void 0 : _c.length) {
return false;

@@ -148,0 +148,0 @@ }

{
"name": "@vtex/order-items",
"version": "0.6.6",
"version": "0.6.7",
"description": "",

@@ -5,0 +5,0 @@ "cdn": "dist/index.umd.js",

@@ -6,6 +6,6 @@ /* eslint-disable @typescript-eslint/no-non-null-assertion */

AssemblyOptionInput,
Item,
OrderFormItemInput,
CatalogItem,
FullItem,
Item,
} from './typings'

@@ -32,5 +32,5 @@

// input has no options
if (input.options == null) {
// and the comparing item has, not the same item
if (item.options?.length) {
if (input.options == null || !input.options?.length) {
// and the comparing item has attachments, not the same item
if ((item as any).attachments?.length) {
return false

@@ -37,0 +37,0 @@ }

@@ -1,2 +0,2 @@

import type { AssemblyOptionInput, Item, OrderFormItemInput, CatalogItem, FullItem } from './typings';
import type { AssemblyOptionInput, OrderFormItemInput, CatalogItem, FullItem, Item } from './typings';
export declare const AVAILABLE = "available";

@@ -3,0 +3,0 @@ export declare const isSameItem: (input: {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc