Add firstLine to cache definition - fixes #3656

This commit is contained in:
Tobias Hößl 2018-03-15 19:34:42 +01:00
parent 09e74481cb
commit 652701e4f3
No known key found for this signature in database
GPG Key ID: 1D780C7599C2D2A2
2 changed files with 3 additions and 2 deletions

View File

@ -44,7 +44,7 @@ Motions:
- Bugfix: Several bugfixes regarding splitting list items in
change recommendations [#3288].
- Bugfix: Several bugfixes regarding diff version [#3407, #3408, #3410,
#3440, #3450, #3465, #3537, #3546, #3548, #3644].
#3440, #3450, #3465, #3537, #3546, #3548, #3644, #3656].
- Added inline Editing for motion reason [#3361].
- Added multiselect filter for motion comments [#3372].
- Added support for pinning personal notes to the window [#3360].

View File

@ -538,7 +538,8 @@ angular.module('OpenSlidesApp.motions.lineNumbering', [])
newRoot = this.insertLineNumbersNode(html, lineLength, highlight, firstLine);
newHtml = newRoot.innerHTML;
} else {
var cacheKey = this.djb2hash(lineLength.toString() + html);
var firstLineStr = (firstLine === undefined || firstLine === null ? '' : firstLine.toString());
var cacheKey = this.djb2hash(firstLineStr + "-" + lineLength.toString() + html);
newHtml = lineNumberCache.get(cacheKey);
if (angular.isUndefined(newHtml)) {