Skip to content

Commit

Permalink
Allow nil values in from.
Browse files Browse the repository at this point in the history
  • Loading branch information
niwinz committed Jan 29, 2021
1 parent 417532a commit ab00ab3
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,10 1,16 @@
# Changelog #

## Version 2021.01.29-1 ##

- Accept `nil` on `from` function.


## Version 2020.12.20-1 ##

- Update to rxjs 7.0.0-beta.9
- Fix minor incompatibilities and unsafe usage of rxjs api.


## Version 2020.05.08-2 ##

- Add `subs` helper as alternative to `subscribe` that receives the
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 4,7 @@
<groupId>funcool</groupId>
<artifactId>beicon</artifactId>
<packaging>jar</packaging>
<version>2020.12.20-1</version>
<version>2021.01.29-1</version>
<name>beicon</name>
<description>Reactive Streams for Clojure(Script)</description>
<url>https://github.com/funcool/beicon</url>
Expand Down
4 changes: 3 additions & 1 deletion src/beicon/core.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 270,9 @@
"Creates an observable from js arrays, clojurescript collections, and
promise instance."
[v]
(.from rx v))
(if (nil? v)
(.empty rx)
(.from rx v)))

(defn from-atom
[atm]
Expand Down

0 comments on commit ab00ab3

Please sign in to comment.