When calling the add data function:
function addData(query, response, id) {
var data = {
"result": response,
"query": query,
"userId": id
};
wixData.insert("queries", data).then((item) => {
console.log(`added ${item} to database`); //see item below
}).catch((err) => {
console.error(`add data error ${err}`);
});
}
It results in the error:
["add data error RangeError: Maximum call stack size exceeded"]
This is my queries collection, and it’s currently empty. I checked and the function is receiving three strings as input.