ImportEtherpad: Simplify attribute key iteration

This commit is contained in:
Richard Hansen 2021-11-25 18:45:46 -05:00
parent 00fc7c8e86
commit 33778281b9

View file

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