Skip to content

Commit a6a107e

Browse files
committed
Update to remove data lines attributes in the patialUpdate to gain better performance
1 parent 614a973 commit a6a107e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

public/js/index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3003,10 +3003,10 @@ function partialUpdate(src, tar, des) {
30033003

30043004
function cloneAndRemoveDataAttr(el) {
30053005
if (!el) return;
3006-
var rawEl = $(el).clone()[0];
3007-
rawEl.removeAttribute('data-startline');
3008-
rawEl.removeAttribute('data-endline');
3009-
return rawEl;
3006+
var rawEl = $(el).clone();
3007+
rawEl.removeAttr('data-startline data-endline');
3008+
rawEl.find('[data-startline]').removeAttr('data-startline data-endline');
3009+
return rawEl[0];
30103010
}
30113011

30123012
function copyAttribute(src, des, attr) {

0 commit comments

Comments
 (0)