ordercloud-api / ordercloud-javascript-sdk

The official Javascript SDK for the OrderCloud eCommerce platform
MIT License
16 stars 16 forks source link

SyntaxError: Duplicate parameter name not allowed in this context #29

Closed cguedes closed 5 years ago

cguedes commented 5 years ago

Just noticed that this version introduced a bug in the /src/index.js file (that is the main file listed in package.json).

The parameter ApiClient is listed twice in the formal argument list. This should be related with the new OC API concept of API Client that was just introduced.

/.../node_modules/ordercloud-javascript-sdk/src/index.js:22
}(function(ApiClient, AccessToken, Address, AddressAssignment, ApiClient, ApiClientAssignment, ApprovalRule, Buyer, BuyerAddress, BuyerCreditCard, BuyerProduct, BuyerSpec, Catalog, CatalogAssignment, Category, CategoryAssignment, CategoryProductAssignment, CostCenter, CostCenterAssignment, CreditCard, CreditCardAssignment, ImpersonateTokenRequest, ImpersonationConfig, Incrementor, Inventory, LineItem, LineItemProduct, LineItemSpec, ListAddress, ListAddressAssignment, ListApiClient, ListApiClientAssignment, ListApprovalRule, ListBuyer, ListBuyerAddress, ListBuyerCreditCard, ListBuyerProduct, ListBuyerSpec, ListCatalog, ListCatalogAssignment, ListCategory, ListCategoryAssignment, ListCategoryProductAssignment, ListCostCenter, ListCostCenterAssignment, ListCreditCard, ListCreditCardAssignment, ListFacet, ListFacetValue, ListImpersonationConfig, ListIncrementor, ListLineItem, ListMess

SyntaxError: Duplicate parameter name not allowed in this context
    at createScript (vm.js:56:10)
    at Object.runInThisContext (vm.js:97:10)
    at Module._compile (module.js:542:28)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/somefile.js:2:18)
*** NODEMON CRASHED ***

https://github.com/ordercloud-api/OrderCloud-JavaScript-SDK/blob/b32b6cbb1285b22973e3e0139ac4350ec25a4aa4/src/index.js#L22

crhistianramirez commented 5 years ago

this issue has since been resolved