diff --git a/packages/datastore/src/datastore/datastore.ts b/packages/datastore/src/datastore/datastore.ts index fccf802eaee..91e25a13657 100644 --- a/packages/datastore/src/datastore/datastore.ts +++ b/packages/datastore/src/datastore/datastore.ts @@ -1036,6 +1036,10 @@ class DataStore { }; stop = async function stop() { + if (this.initialized !== undefined) { + await this.start(); + } + if (syncSubscription && !syncSubscription.closed) { syncSubscription.unsubscribe(); }