Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions extension/backend/hook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ function getAtom(component: Component) {

// this will loop through component.state to get the atom data
for (let i = 0; i < component.state.length; i++) {
if (component.state[i]['current'] instanceof Set || component.state[i]['current'] instanceof Map) {
if (component.state[i] && (component.state[i]['current'] instanceof Set || component.state[i]['current'] instanceof Map)) {

// this code will give us the value from the existing set/map in component.state to add to our newly created set
const it = component.state[i]['current'].values();
Expand Down Expand Up @@ -390,4 +390,4 @@ function sendToContentScript(obj: any) {
}

//the patcher function is invoked one time when the app first runs to modify the onCommitFiberRoot function in React devTools to extract React Fiber
patcher();
patcher();