Hi there! I’m using insert() ( https://www.wix.com/corvid/reference/wix-data.html#insert ) and I’m getting an issue where its adding two records instead of one. Essentially it looks like the code is running twice, when it shouldn’t I’ve used this function across many websites successfully before, but I’m stumped. Below is my code. Thank you!
function addToPointDB() {
let toInsert = {
“title”: pointID,
};
wixData.insert(“Points”, toInsert)
.then( (results2) => {
let item = results2; //see item below
} )
.catch( (err) => {
let errorMsg = err;
} );
}