You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With nested functions/definitions, an error occurs when the inner value is not defined on the parameters/payload.
Minimal example that causes this problem:
var mappingTemplate = require('api-gateway-mapping-template');
var template = '$util.escapeJavaScript($input.params(\'test\'))';
var params = {
header: {},
querystring: {},
path: {}
};
var payload = '';
var result = mappingTemplate({
template: template,
params: params
payload: payload
});
// Results in error similar to
// Error: Cannot read property 'split' of undefined on $util.escapeJavaScript($input.params('test')) at L/N 1:0
Expected behavior (and as far as I understand, what API Gateway would actually do) is to resolve this to be completely undefined, meaning calls to util functions with an undefined parameter results in an undefined value.
The text was updated successfully, but these errors were encountered:
With nested functions/definitions, an error occurs when the inner value is not defined on the parameters/payload.
Minimal example that causes this problem:
Expected behavior (and as far as I understand, what API Gateway would actually do) is to resolve this to be completely undefined, meaning calls to util functions with an undefined parameter results in an undefined value.
The text was updated successfully, but these errors were encountered: