Skip to content

RDT crashes page if store.subscribe is undefined #2075

Description

@philipwhiuk
page.bundle.js:6 Uncaught TypeError: t.subscribe is not a function
    at I (page.bundle.js:6:6537)
    at page.bundle.js:6:6935
    at hk (main.jsx-4WfQJ2Z1.js:841:35810)
    at main.jsx-4WfQJ2Z1.js:841:65460

Source code:

store.subscribe(handleChange);

Sample store definition from Chrome inspect:

{
   @@observable: ƒ [d]()
   dispatch: ƒ s(c)
   getState: ƒ i()
   liftedStore: ƒ ()
   replaceReducer: ƒ replaceReducer(c)
   [[Prototype]]: Object
}

I think this is because RDT now has a higher Redux version requirement. But it should gracefully fail rather than crash the whole page

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions