tshaddix / webext-redux

A set of utilities for building Redux applications in Web Extensions.
MIT License
1.23k stars 180 forks source link

bind 'this' for getState and subscribe in Store constructor #289

Closed dermeck closed 5 months ago

dermeck commented 2 years ago

This change adds 'this'-binding inside the Store constructor for getState and subscribe. This fixes the Uncaught TypeError: Cannot read properties of undefined (reading 'state') when using webext-redux with newer versions of react-redux.

Should fix https://github.com/tshaddix/webext-redux/issues/280 and fix https://github.com/tshaddix/webext-redux/issues/286

buberdds commented 2 years ago

Is there a chance to merge this fix?