From 809dc6e367f1db7f25e08dcc04fda5eb7e9b1b0f Mon Sep 17 00:00:00 2001 From: Richard Hansen Date: Fri, 29 Jan 2021 17:15:00 -0500 Subject: [PATCH] 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. --- bin/rebuildPad.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/rebuildPad.js b/bin/rebuildPad.js index 3e6e6e5fa..f5043b85b 100644 --- a/bin/rebuildPad.js +++ b/bin/rebuildPad.js @@ -26,8 +26,8 @@ const newPadId = process.argv[4] || `${padId}-rebuilt`; const db = require('ep_etherpad-lite/node/db/DB'); await db.init(); - const Pad = require('ep_etherpad-lite/node/db/Pad').Pad; 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 // HACK: This is a standalone script, so we want to write everything // out to the database immediately. The only problem with this is