diff --git a/CHANGELOG.md b/CHANGELOG.md index 9e96e7ae3..3ef131811 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # OverReact Changelog +## 1.11.2 + +> [Complete `1.11.2` Changeset](https://github.com/Workiva/over_react/compare/1.11.1...1.11.2) + +__Improvements__ + +* [e805b79b](https://github.com/Workiva/over_react/commit/e805b79b56f90989194ebf0a7951357e7b40f75c) Null-coalesce `isDisposedOrDisposing` to ease consumer test breakages + ## 1.11.1 > [Complete `1.11.1` Changeset](https://github.com/Workiva/over_react/compare/1.11.0...1.11.1) diff --git a/README.md b/README.md index a6e431f41..18e7c2c2d 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,7 @@ ```yaml dependencies: - over_react: "^1.11.1" + over_react: "^1.11.2" ``` 2. Add the `over_react` [transformer] to your `pubspec.yaml`. diff --git a/lib/src/component_declaration/flux_component.dart b/lib/src/component_declaration/flux_component.dart index c357af789..c34815d20 100644 --- a/lib/src/component_declaration/flux_component.dart +++ b/lib/src/component_declaration/flux_component.dart @@ -152,12 +152,15 @@ abstract class _FluxComponentMixin implements Batche handlers.forEach((store, handler) { String message = 'Cannot listen to a disposed/disposing Store.'; - assert(!store.isDisposedOrDisposing, '$message This can be caused by BatchedRedraws ' + + var isDisposedOrDisposing = store.isDisposedOrDisposing ?? false; + + assert(!isDisposedOrDisposing, '$message This can be caused by BatchedRedraws ' 'mounting the component asynchronously after the store has been disposed. If you are ' 'in a test environment, try adding an `await window.animationFrame;` before disposing your ' 'store.'); - if (store.isDisposedOrDisposing) _logger.warning(message); + if (isDisposedOrDisposing) _logger.warning(message); StreamSubscription subscription = store.listen(handler); _subscriptions.add(subscription); diff --git a/pubspec.yaml b/pubspec.yaml index c7d314580..f7b001ae6 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,5 +1,5 @@ name: over_react -version: 1.11.1 +version: 1.11.2 description: A library for building statically-typed React UI components using Dart. homepage: https://github.com/Workiva/over_react/ authors: