producteca-sdk
Advanced tools
Comparing version 7.0.0 to 7.0.1
@@ -24,3 +24,3 @@ (function() { | ||
var ref; | ||
return ((ref = variation.sku) != null ? ref.toUpperCase() : void 0) === (sku != null ? sku.toUpperCase() : void 0); | ||
return ((ref = variation.sku) != null ? ref.toUpperCase().trim() : void 0) === (sku != null ? sku.toUpperCase().trim() : void 0); | ||
}); | ||
@@ -27,0 +27,0 @@ }; |
@@ -31,3 +31,3 @@ (function() { | ||
describe("when findVariationBySku is called", function() { | ||
it("should return the variation where the sku is equal (case insensitive)", function() { | ||
it("should return the variation where the sku is equal (case and trailing space insensitive)", function() { | ||
var product; | ||
@@ -39,3 +39,3 @@ product = createProductWithVariations({ | ||
}); | ||
return product.findVariationBySku("a").should.be.eql({ | ||
return product.findVariationBySku("a ").should.be.eql({ | ||
sku: "A" | ||
@@ -42,0 +42,0 @@ }); |
@@ -8,3 +8,3 @@ { | ||
}, | ||
"version": "7.0.0", | ||
"version": "7.0.1", | ||
"main": "build/sdk.js", | ||
@@ -11,0 +11,0 @@ "dependencies": { |
61629