diff --git a/src/node/utils/ImportEtherpad.js b/src/node/utils/ImportEtherpad.js index 0c0dbcc7a..bc46d10bc 100644 --- a/src/node/utils/ImportEtherpad.js +++ b/src/node/utils/ImportEtherpad.js @@ -1,3 +1,5 @@ +// 'use strict'; +// Uncommenting above breaks tests. /** * 2014 John McLear (Etherpad Foundation / McLear Ltd) * @@ -14,12 +16,11 @@ * limitations under the License. */ -const log4js = require('log4js'); const db = require('../db/DB'); -const hooks = require('ep_etherpad-lite/static/js/pluginfw/hooks'); +const hooks = require('../../static/js/pluginfw/hooks'); -exports.setPadRaw = function (padId, records) { - records = JSON.parse(records); +exports.setPadRaw = (padId, r) => { + const records = JSON.parse(r); Object.keys(records).forEach(async (key) => { let value = records[key];