Skip to content
This repository was archived by the owner on Dec 6, 2023. It is now read-only.

Commit 7219574

Browse files
committed
fix: Don't try and send subscriptions if we don't have a store.
1 parent 50d2ce5 commit 7219574

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/subscriptionsHandler.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,15 @@ export default function createSubscriptionHandler(
1111
}
1212

1313
function getChanges() {
14+
// If we don't have reactotron, dont have a store or getState isn't a function then get out. Now.
15+
if (
16+
!reactotron ||
17+
!reactotron.reduxStore ||
18+
typeof reactotron.reduxStore.getState !== "function"
19+
) {
20+
return []
21+
}
22+
1423
const state = reactotron.reduxStore.getState()
1524

1625
const changes = []

0 commit comments

Comments
 (0)