code tidy up: always evaluates

This commit is contained in:
John McLear 2021-02-21 16:41:33 +00:00
parent 1b8cd0747d
commit 0f8f2b88ae
4 changed files with 5 additions and 5 deletions

View file

@ -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) {

View file

@ -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;

View file

@ -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

View file

@ -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;