Comparing version 2.3.1 to 2.3.2
# Change Log | ||
All notable changes to this project will be documented in this file. | ||
## 2.3.2 - 2021-02-14 | ||
- Fix edge case error when removing listeners (@zshannon [#108](https://github.com/keajs/kea/pull/108/files)) | ||
## 2.3.1 - 2021-02-14 | ||
@@ -5,0 +8,0 @@ - Nicer error when accessing something in the store that doesn't exist |
{ | ||
"name": "kea", | ||
"version": "2.3.1", | ||
"version": "2.3.2", | ||
"description": "Smart front-end architecture", | ||
@@ -5,0 +5,0 @@ "author": "Marius Andra", |
@@ -234,5 +234,7 @@ import { getContext, setPluginContext, getPluginContext } from '../context' | ||
Object.keys(listeners).forEach((action) => { | ||
delete byAction[action][pathString] | ||
if (Object.keys(byAction[action]).length === 0) { | ||
delete byAction[action] | ||
if (byAction[action]) { | ||
delete byAction[action][pathString] | ||
if (Object.keys(byAction[action]).length === 0) { | ||
delete byAction[action] | ||
} | ||
} | ||
@@ -239,0 +241,0 @@ }) |
279754
7018