I'm encountering an issue:
ERROR Error: Uncaught (in promise): DataCloneError: Failed to execute 'put' on 'IDBObjectStore': Position object could not be cloned. Error: Failed to execute 'put' on 'IDBObjectStore': Position object could not be cloned.
Here's a snippet of the code in question:
geolocate() {
this.geo.getCurrentPosition().then((resp) => {
// resp.coords.latitude
// resp.coords.longitude
this.storage.set('GeoLocation', resp);
}).catch((error) => {
console.log('Error getting location', error);
});
let watch = this.geo.watchPosition();
watch.subscribe((data) => {
// data can be a set of coordinates, or an error (if an error occurred).
// data.coords.latitude
// data.coords.longitude
});
}