Custom discount / graphql limits

Hi Dan-Hrpr,

This doesn’t seem like you’re running into a limit (e.g. instruction count limit or input query limit).

Specifically, the error message “TypeError: cannot read property ‘reduce’ of undefined” makes me think it’s a JS runtime error.

If you console.error the input when your function runs, you might be able to identify the cause. Maybe selectedProducts, or one of its properties, is undefined.

Best,

Tobe