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
parent
5b519b9a9c
commit
809dc6e367
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue