Based on the screenshots and error message you provided, it looks like flattenParams() is being called with the “data” parameter undefined. Try doing a console.log(data) to see what is being passed to the function. You can also add some validation for “data” like you have for the “path” parameter. The screenshots do not show when the function is called, so you’ll need to track down the code that is calling it and confirm that it is passing a valid parameters to the function.