Data object insertion - throws the error: undefined is not a function. But at the same time, the DB entry is successful.
function PendingData() {
this.data = “”;
this.mobile = “”;
}
for(var i=0; i< nonDroidDevices.length; i++) {
var item = new PendingData();
item.data = Notification.get(“objectId”);
item.mobile = nonDroidDevices;
try{
var savedItem = Backendless.Persistence.of( PendingData ).save(item);
} catch (err){
console.log("Backendless DB error: msg: ", err.message);
}
}
Hi Abhishek,
Could you please let me know what line reports that error? Also, if it happens to be inside of backendless.js, could you please check in Chrome’s console to see if there is a line number there?
And one more question: do you import backendless.js from our site (api.backendless.com/sdk/js/latest/backendless.js) or is it residing locally in your app?
Regards,
Mark
Thanks! I think it might be because the Async argument is missing (which should be okay since it is optional). We will look into it.
Abhishek,
The problem has been fixed. As soon as our QA confirms it, we will push the updated SDK to the website.
Regards,
Mark