The following code is working perfectly fine in development mode: ng serve --open
addDriver(driver: any) {
return fromPromise(this.db.insert('driver', driver));
}
But fails with the following error when deployed to production with this error: ng build --prod
ERROR TypeError: Object(...) is not a function
Getting this error on this.db.insert
I am guessing it has something to do with ASI(Automatic Semicolon Insertion)
Any help is highly appreciated.
Thanks in advance.