diff --git a/src/node/db/Pad.js b/src/node/db/Pad.js index 965f2793f..a34668987 100644 --- a/src/node/db/Pad.js +++ b/src/node/db/Pad.js @@ -87,7 +87,7 @@ Pad.prototype.appendRevision = async function appendRevision(aChangeset, author) // ex. getNumForAuthor if (author !== '') { - this.pool.putAttrib(['author', author || '']); + this.pool.putAttrib(['author', author]); } if (newRev % 100 === 0) { diff --git a/src/node/utils/ExportHtml.js b/src/node/utils/ExportHtml.js index 999b22639..c3e229f2a 100644 --- a/src/node/utils/ExportHtml.js +++ b/src/node/utils/ExportHtml.js @@ -314,7 +314,7 @@ const getHTMLFromAtext = async (pad, atext, authorColors) => { await hooks.aCallAll('getLineHTMLForExport', context); // To create list parent elements if ((!prevLine || prevLine.listLevel !== line.listLevel) || - (prevLine && line.listTypeName !== prevLine.listTypeName)) { + (line.listTypeName !== prevLine.listTypeName)) { const exists = _.find(openLists, (item) => ( item.level === line.listLevel && item.type === line.listTypeName) ); @@ -414,7 +414,7 @@ const getHTMLFromAtext = async (pad, atext, authorColors) => { if ((!nextLine || !nextLine.listLevel || nextLine.listLevel < line.listLevel) || - (nextLine && line.listTypeName !== nextLine.listTypeName)) { + (line.listTypeName !== nextLine.listTypeName)) { let nextLevel = 0; if (nextLine && nextLine.listLevel) { nextLevel = nextLine.listLevel; diff --git a/src/static/js/ace2_inner.js b/src/static/js/ace2_inner.js index 429fef7cd..4858aa1b4 100644 --- a/src/static/js/ace2_inner.js +++ b/src/static/js/ace2_inner.js @@ -3782,7 +3782,7 @@ function Ace2Inner() { // We apply the height of a line in the doc body, to the corresponding sidediv line number const updateLineNumbers = () => { - if (!currentCallStack || currentCallStack && !currentCallStack.domClean) return; + if (!currentCallStack || !currentCallStack.domClean) return; // Refs #4228, to avoid layout trashing, we need to first calculate all the heights, // and then apply at once all new height to div elements diff --git a/src/static/js/contentcollector.js b/src/static/js/contentcollector.js index 1c601cc54..c250008bb 100644 --- a/src/static/js/contentcollector.js +++ b/src/static/js/contentcollector.js @@ -195,7 +195,7 @@ const makeContentCollector = (collectStyles, abrowser, apool, className2Author) } } - if (listType === 'none' || !listType) { + if (listType === 'none') { delete state.lineAttributes.list; } else { state.lineAttributes.list = listType;