File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 1616 * limitations under the License.
1717 */
1818
19+ const AttributePool = require ( '../../static/js/AttributePool' ) ;
1920const { Pad} = require ( '../db/Pad' ) ;
2021const authorManager = require ( '../db/AuthorManager' ) ;
2122const db = require ( '../db/DB' ) ;
@@ -72,11 +73,12 @@ exports.setPadRaw = async (padId, r) => {
7273 value . padIDs = { [ padId ] : 1 } ;
7374 } else if ( padKeyPrefixes . includes ( prefix ) ) {
7475 checkOriginalPadId ( id ) ;
75- if ( prefix === 'pad' && keyParts . length === 2 && value . pool ) {
76+ if ( prefix === 'pad' && keyParts . length === 2 ) {
77+ const pool = new AttributePool ( ) . fromJsonable ( value . pool ) ;
7678 const unsupportedElements = new Set ( ) ;
77- for ( const [ k ] of Object . values ( value . pool . numToAttrib ) ) {
79+ pool . eachAttrib ( ( k , v ) => {
7880 if ( ! supportedElems . has ( k ) ) unsupportedElements . add ( k ) ;
79- }
81+ } ) ;
8082 if ( unsupportedElements . size ) {
8183 logger . warn ( `(pad ${ padId } ) unsupported attributes (try installing a plugin): ` +
8284 `${ [ ...unsupportedElements ] . join ( ', ' ) } ` ) ;
You can’t perform that action at this time.
0 commit comments