Fix error `No item 0 in vector of length 0`
This commit is contained in:
parent
d89616374c
commit
3c1f48a81b
|
@ -1,7 +1,11 @@
|
||||||
# Change Log
|
# Change Log
|
||||||
All notable changes to this project will be documented in this file. This change log follows the conventions of [keepachangelog.com](http://keepachangelog.com/).
|
All notable changes to this project will be documented in this file. This change log follows the conventions of [keepachangelog.com](http://keepachangelog.com/).
|
||||||
|
|
||||||
## Unreleased
|
## [0.1.21] - Unreleased
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
* Avoid throwing an error `No item 0 in vector of length 0` under certain circumstances.
|
||||||
|
|
||||||
## [0.1.20] - 2018-02-14
|
## [0.1.20] - 2018-02-14
|
||||||
|
|
||||||
|
|
|
@ -566,11 +566,10 @@
|
||||||
|
|
||||||
new-sub-state (last subscription-match-state)
|
new-sub-state (last subscription-match-state)
|
||||||
timing (mapv (fn [match]
|
timing (mapv (fn [match]
|
||||||
;; TODO: this isn't quite correct, shouldn't be using filtered-traces here
|
|
||||||
(let [epoch-traces (into []
|
(let [epoch-traces (into []
|
||||||
(comp
|
(comp
|
||||||
(utils/id-between-xf (:id (first match)) (:id (last match))))
|
(utils/id-between-xf (:id (first match)) (:id (last match))))
|
||||||
filtered-traces)
|
all-traces)
|
||||||
start-of-epoch (nth epoch-traces 0)
|
start-of-epoch (nth epoch-traces 0)
|
||||||
;; TODO: optimise trace searching
|
;; TODO: optimise trace searching
|
||||||
event-handler-trace (first (filter metam/event-handler? epoch-traces))
|
event-handler-trace (first (filter metam/event-handler? epoch-traces))
|
||||||
|
|
Loading…
Reference in New Issue