Fix bug in CC handlers

This commit is contained in:
Oswaldo Acauan 2017-02-08 16:46:14 +00:00
parent 0c1f191db5
commit 6a0978e4ad
2 changed files with 4 additions and 1 deletions

View File

@ -45,7 +45,7 @@ export default function handleCaptionHistory({ payload }) {
ownerId,
captions,
index,
next: (index === chunks.length - 1) ? index + 1 : undefined,
next: (index < chunks.length - 1) ? index + 1 : undefined,
};
captionsAdded.push(addCaption(meetingId, locale, captionHistoryObject));

View File

@ -14,6 +14,9 @@ export default function addCaption(meetingId, locale, captionHistory, id = false
if (id) {
selector._id = id;
} else {
selector['captionHistory.next'] = captionHistory.next;
selector['captionHistory.index'] = captionHistory.index;
}
let modifier = {