claudia-api-builder
Advanced tools
Comparing version 2.3.0 to 2.3.1
{ | ||
"name": "claudia-api-builder", | ||
"version": "2.3.0", | ||
"version": "2.3.1", | ||
"description": "Simplify AWS ApiGateway handling", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -61,3 +61,5 @@ /*global module, require */ | ||
} | ||
if (canonicalContentType === 'application/json') { | ||
if (canonicalContentType === 'application/json' && | ||
(typeof result.rawBody !== 'object' || !result.rawBody) // null will also result in type 'object' | ||
) { | ||
result.body = JSON.parse(result.rawBody || '{}'); | ||
@@ -64,0 +66,0 @@ } else { |
24369
518