From 652701e4f3005393ebb14778c739bd82ac3baca7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20Ho=CC=88=C3=9Fl?= Date: Thu, 15 Mar 2018 19:34:42 +0100 Subject: [PATCH] Add firstLine to cache definition - fixes #3656 --- CHANGELOG | 2 +- openslides/motions/static/js/motions/linenumbering.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index a46a880bd..94e049409 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -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]. diff --git a/openslides/motions/static/js/motions/linenumbering.js b/openslides/motions/static/js/motions/linenumbering.js index 34006b202..964198dd9 100644 --- a/openslides/motions/static/js/motions/linenumbering.js +++ b/openslides/motions/static/js/motions/linenumbering.js @@ -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)) {