@activepieces/pieces-common
Advanced tools
Comparing version
{ | ||
"name": "@activepieces/pieces-common", | ||
"version": "0.5.1", | ||
"version": "0.5.2", | ||
"type": "commonjs", | ||
@@ -34,4 +34,4 @@ "dependencies": { | ||
}, | ||
"main": "./src/index.js", | ||
"types": "./src/index.d.ts" | ||
"types": "./src/index.d.ts", | ||
"main": "./src/index.js" | ||
} |
@@ -101,2 +101,3 @@ "use strict"; | ||
]; | ||
const objectContentTypeSuffixes = ['+json', '+xml']; | ||
let response; | ||
@@ -117,3 +118,5 @@ try { | ||
// Return unaltered response if content type is associated with objects or strings | ||
if (objectContentTypes.some(type => (contentTypeValue !== null && contentTypeValue !== void 0 ? contentTypeValue : '').includes(type))) { | ||
const isObjectContentType = objectContentTypes.some(type => (contentTypeValue !== null && contentTypeValue !== void 0 ? contentTypeValue : '').includes(type)) || | ||
objectContentTypeSuffixes.some(suffix => (contentTypeValue !== null && contentTypeValue !== void 0 ? contentTypeValue : '').endsWith(suffix)); | ||
if (isObjectContentType) { | ||
try { | ||
@@ -120,0 +123,0 @@ // Parse JSON responses if valid |
Sorry, the diff of this file is not supported yet
71174
0.72%980
0.31%