bin/rebuildPad.js: PadManager must be loaded before Pad

There is a circular dependency between the two; loading PadManager
first ensures that PadManager's Pad variable is not undefined.
pull/4656/head
Richard Hansen 2021-01-29 17:15:00 -05:00 committed by John McLear
parent 5b519b9a9c
commit 809dc6e367
1 changed files with 1 additions and 1 deletions

View File

@ -26,8 +26,8 @@ const newPadId = process.argv[4] || `${padId}-rebuilt`;
const db = require('ep_etherpad-lite/node/db/DB'); const db = require('ep_etherpad-lite/node/db/DB');
await db.init(); await db.init();
const Pad = require('ep_etherpad-lite/node/db/Pad').Pad;
const PadManager = require('ep_etherpad-lite/node/db/PadManager'); const PadManager = require('ep_etherpad-lite/node/db/PadManager');
const Pad = require('ep_etherpad-lite/node/db/Pad').Pad;
// Get references to the original pad and to a newly created pad // Get references to the original pad and to a newly created pad
// HACK: This is a standalone script, so we want to write everything // HACK: This is a standalone script, so we want to write everything
// out to the database immediately. The only problem with this is // out to the database immediately. The only problem with this is