From 8741db27dc552e68c8faedf2cf8ab334e1e7ab74 Mon Sep 17 00:00:00 2001 From: Johannes Hoermann <j.hoermann@adito.de> Date: Tue, 27 Aug 2019 15:53:00 +0200 Subject: [PATCH] fix Scan Service warnings --- process/getDocxDocument_serverProcess/process.js | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/process/getDocxDocument_serverProcess/process.js b/process/getDocxDocument_serverProcess/process.js index 44b9ff0378..bf5ef591a1 100644 --- a/process/getDocxDocument_serverProcess/process.js +++ b/process/getDocxDocument_serverProcess/process.js @@ -11432,7 +11432,8 @@ DOMHandler.prototype = { this.doc.normalize(); }, setDocumentLocator:function (locator) { - if(this.locator = locator){// && !('lineNumber' in locator)){ + this.locator = locator; + if(this.locator){// && !('lineNumber' in locator)){ locator.lineNumber = 0; } }, @@ -11978,12 +11979,14 @@ function _visitNode(node,callback){ if(callback(node)){ return true; } - if(node = node.firstChild){ + node = node.firstChild; + if(node){ do{ if(_visitNode(node,callback)){return true} - }while(node=node.nextSibling) - } - return undefined; + node=node.nextSibling; + }while(node) + } + return undefined; } @@ -13433,7 +13436,8 @@ function split(source,start){ var reg = /'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g; reg.lastIndex = start; reg.exec(source);//skip < - while(match = reg.exec(source)){ + match = reg.exec(source); + while(match){ buf.push(match); if(match[1])return buf; } -- GitLab