forked from day8/re-frame
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid running after/enrich without a db effect
Previously both standard interceptors acted upon the `db` *coffect* if no *effect* was available. Per day8#453 and related discussion, there is little reason in general to do this, since this context means that the `app-db` should not change. Both functions are changed to explicitly check for the presence of the `db` effect. If it is not present in the context, the interceptor function is not run. The previous functionality around `nil` and `false` values for the `db` effect is preserved: the interceptors *are* run in this case. Tests are added to verify the behavior of both functions in the case of non-presence, falsey and truthy values. The relevant docstrings are tweaked to accomodate this change. Closes day8#453.
- Loading branch information
Showing
3 changed files
with
54 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters