diff --git a/src/parse.js b/src/parse.js index 6f6f53b..5f9ae46 100644 --- a/src/parse.js +++ b/src/parse.js @@ -347,9 +347,13 @@ export const getTraverser = (cb = noop, opts = {}) => { // The argument is an object mapping key names to gettext props return Object.keys(arg).reduce((acc, prop) => { const gettextPropName = arg[prop] - const matchingObjectValue = node.arguments[i].properties.find( + const matchingObject = node.arguments[i].properties.find( (x) => x.key.name === prop - ).value.value + ) + if (matchingObject === undefined) { + return acc + } + const matchingObjectValue = matchingObject.value.value return gettextPropName === 'comment' ? { ...acc,