Skip to content

Commit

Permalink
in clojure the empty string is true (frege would have been proud!)
Browse files Browse the repository at this point in the history
  • Loading branch information
branch14 committed Mar 6, 2017
1 parent e847997 commit 520cf90
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/vrng/src/vrng/media.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
(defn can-play?
"Checks if a given mimetype can be played by the browser."
[mime]
(not (not (and (.-canPlayType (audio-element))
(replace (.canPlayType (audio-element) mime) #"no" "")))))
(not (empty? (and (.-canPlayType (audio-element))
(replace (.canPlayType (audio-element) mime) #"no" "")))))

(def ^:private formats
[{:format "ogg" :mime "audio/ogg; codecs='vorbis'"}
Expand Down

0 comments on commit 520cf90

Please sign in to comment.