mirror of
https://github.com/outline/outline.git
synced 2026-11-25 07:04:37 +03:00
fix: JS error on server
This commit is contained in:
1 parent
8ac5a574f3
commit
47ff6feaee
1 file changed
+1
-1
@@ -887,9 +887,9 @@ router.post('documents.move', auth(), async ctx => {
|
||||
|
||||
const user = ctx.state.user;
|
||||
const document = await Document.findByPk(id, { userId: user.id });
|
||||
const { collection } = document;
|
||||
authorize(user, 'move', document);
|
||||
|
||||
const { collection } = document;
|
||||
if (collection.type !== 'atlas' && parentDocumentId) {
|
||||
throw new InvalidRequestError(
|
||||
'Document cannot be nested in this collection type'
|
||||
|
||||
Reference in new issue
Block a user