Skip to content

Commit

Permalink
ImportEtherpad: Simplify attribute key iteration
Browse files Browse the repository at this point in the history
  • Loading branch information
rhansen committed Nov 29, 2021
1 parent 00fc7c8 commit 3377828
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/node/utils/ImportEtherpad.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,8 @@ exports.setPadRaw = async (padId, r) => {
value.padIDs = {[padId]: 1};
} else if (padKeyPrefixes.includes(prefix)) {
if (prefix === 'pad' && keyParts.length === 2 && value.pool) {
for (const attrib of Object.keys(value.pool.numToAttrib)) {
const attribName = value.pool.numToAttrib[attrib][0];
if (!supportedElems.has(attribName)) unsupportedElements.add(attribName);
for (const [k] of Object.values(value.pool.numToAttrib)) {
if (!supportedElems.has(k)) unsupportedElements.add(k);
}
}
keyParts[1] = padId;
Expand Down

0 comments on commit 3377828

Please sign in to comment.