mkfashion-sdk 2.4.0 → 2.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/mkfashion-sdk-2.4.1.tgz +0 -0
- package/mkfashion-sdk-2.4.2.tgz +0 -0
- package/package.json +1 -1
- package/src/mkfashion.js +4 -1
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
package/src/mkfashion.js
CHANGED
|
@@ -247,11 +247,12 @@ const mkfashion = {
|
|
|
247
247
|
return Promise.reject(new Error('identifier e obrigatorio'))
|
|
248
248
|
}
|
|
249
249
|
|
|
250
|
+
identifier = String(identifier).trim()
|
|
250
251
|
const resolved = this._resolveProjectId(projectId)
|
|
251
252
|
this._log('Verificando disponibilidade', { projectId: resolved, identifier })
|
|
252
253
|
|
|
253
254
|
try {
|
|
254
|
-
const url = `${this.apiUrl}/availability/${resolved}
|
|
255
|
+
const url = `${this.apiUrl}/availability/${resolved}?sku=${encodeURIComponent(identifier)}`
|
|
255
256
|
const response = await fetch(url)
|
|
256
257
|
|
|
257
258
|
if (!response.ok) {
|
|
@@ -322,6 +323,8 @@ const mkfashion = {
|
|
|
322
323
|
return Promise.reject(new Error('identifier e obrigatorio'))
|
|
323
324
|
}
|
|
324
325
|
|
|
326
|
+
identifier = String(identifier).trim()
|
|
327
|
+
|
|
325
328
|
// Retorna do cache se disponível (evita chamada API após add_to_cart)
|
|
326
329
|
if (this._lastCartProductData?.product) {
|
|
327
330
|
const cached = this._lastCartProductData
|