- // This may have broken history's in-sorted-order invariant
- var hi = history.indexOf(message);
- if ((history[hi-1] && history[hi-1].Time > message.Time) ||
- (history[hi+1] && history[hi+1].Time < message.Time)) {
- history.splice(hi,1);
+ // This may have broken hist's in-sorted-order invariant
+ var hi = hist.indexOf(message);
+ if ((hist[hi-1] && hist[hi-1].Time > message.Time) ||
+ (hist[hi+1] && hist[hi+1].Time < message.Time)) {
+ hist.splice(hi,1);