mirror of
https://github.com/inaturalist/iNaturalistReactNative.git
synced 2026-06-18 12:41:54 -04:00
This fetches a remote copy of each observation after upload to make sure the client has the freshest copy of the data immediately.
16 lines
467 B
JavaScript
16 lines
467 B
JavaScript
// Helpers for making factoria modals
|
|
|
|
// Trivial toJSON implementation. Note that it is import to use the
|
|
// `function`` keyword here so that `this` refers to the actual factoria
|
|
// object and not the global scope
|
|
// eslint-disable-next-line import/prefer-default-export
|
|
export function toJSON( ) {
|
|
const json = {};
|
|
Object.keys( this ).forEach( key => {
|
|
if ( typeof ( this[key] ) !== "function" ) {
|
|
json[key] = this[key];
|
|
}
|
|
} );
|
|
return json;
|
|
}
|