ImportEtherpad: Avoid false positives when checking apool

pull/5304/head
Richard Hansen 2021-11-25 01:10:04 -05:00
parent 003e5cbd4b
commit 8e9bc8d325
1 changed files with 1 additions and 2 deletions

View File

@ -54,8 +54,7 @@ exports.setPadRaw = async (padId, r) => {
} }
value.padIDs = {[padId]: 1}; value.padIDs = {[padId]: 1};
} else { } else {
// is this an attribute we support or not? If not, tell the admin if (prefix === 'pad' && keyParts.length === 2 && value.pool) {
if (value.pool) {
for (const attrib of Object.keys(value.pool.numToAttrib)) { for (const attrib of Object.keys(value.pool.numToAttrib)) {
const attribName = value.pool.numToAttrib[attrib][0]; const attribName = value.pool.numToAttrib[attrib][0];
if (!supportedElems.has(attribName)) unsupportedElements.add(attribName); if (!supportedElems.has(attribName)) unsupportedElements.add(attribName);