From a6a107eab9f8e9f5dc42b11ecdb9583d4f2a8685 Mon Sep 17 00:00:00 2001 From: Cheng-Han, Wu Date: Fri, 17 Jun 2016 16:33:01 +0800 Subject: Update to remove data lines attributes in the patialUpdate to gain better performance --- public/js/index.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'public/js/index.js') diff --git a/public/js/index.js b/public/js/index.js index 3ca0517c..dc5f928c 100644 --- a/public/js/index.js +++ b/public/js/index.js @@ -3003,10 +3003,10 @@ function partialUpdate(src, tar, des) { function cloneAndRemoveDataAttr(el) { if (!el) return; - var rawEl = $(el).clone()[0]; - rawEl.removeAttribute('data-startline'); - rawEl.removeAttribute('data-endline'); - return rawEl; + var rawEl = $(el).clone(); + rawEl.removeAttr('data-startline data-endline'); + rawEl.find('[data-startline]').removeAttr('data-startline data-endline'); + return rawEl[0]; } function copyAttribute(src, des, attr) { -- cgit v1.2.3