mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-22 00:16:15 -04:00
ImportHandler: Skip default pad text when importing to a new pad
This commit is contained in:
parent
c8f2409de0
commit
c2910b98e8
1 changed files with 2 additions and 1 deletions
|
@ -139,7 +139,8 @@ const doImport = async (req, res, padId) => {
|
||||||
|
|
||||||
let directDatabaseAccess = false;
|
let directDatabaseAccess = false;
|
||||||
if (fileIsEtherpad) {
|
if (fileIsEtherpad) {
|
||||||
const pad = await padManager.getPad(padId);
|
// Use '\n' to avoid the default pad text if the pad doesn't yet exist.
|
||||||
|
const pad = await padManager.getPad(padId, '\n');
|
||||||
const headCount = pad.head;
|
const headCount = pad.head;
|
||||||
if (headCount >= 10) {
|
if (headCount >= 10) {
|
||||||
logger.warn('Aborting direct database import attempt of a pad that already has content');
|
logger.warn('Aborting direct database import attempt of a pad that already has content');
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue