From 378b3986dc1f0429274bee42322534aaea8ea921 Mon Sep 17 00:00:00 2001 From: KOUNOIKE Yuusuke Date: Fri, 4 May 2018 14:39:29 +0900 Subject: [PATCH] Fix JSON diff issue. --- src/main/webapp/assets/common/js/gitbucket.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/webapp/assets/common/js/gitbucket.js b/src/main/webapp/assets/common/js/gitbucket.js index a333d3c33..df240b7ee 100644 --- a/src/main/webapp/assets/common/js/gitbucket.js +++ b/src/main/webapp/assets/common/js/gitbucket.js @@ -78,10 +78,10 @@ function displayErrors(data, elem){ function diffUsingJS(oldTextId, newTextId, outputId, viewType, ignoreSpace) { var old = $('#'+oldTextId), head = $('#'+newTextId); var render = new JsDiffRender({ - oldText: old.data('val'), - oldTextName: old.data('file-name'), - newText: head.data('val'), - newTextName: head.data('file-name'), + oldText: old.attr('data-val'), + oldTextName: old.attr('data-file-name'), + newText: head.attr('data-val'), + newTextName: head.attr('data-file-name'), ignoreSpace: ignoreSpace, contextSize: 4 });