Fix createWorkspace Meteor method fails with "Expected string, got undefined"

Thanks to TheBoysenBuilds and xet7 !

Fixes #6150
This commit is contained in:
Lauri Ojansivu 2026-02-19 23:17:53 +02:00
parent f6f16608dd
commit 06d418b12b

View file

@ -1948,7 +1948,9 @@ Meteor.methods({
user.toggleDesktopHandles(user.hasShowDesktopDragHandles());
},
// Spaces: create a new space under parentId (or root when null)
createWorkspace({ parentId = null, name }) {
createWorkspace(params) {
check(params, Object);
const { parentId = null, name } = params;
check(parentId, Match.OneOf(String, null));
check(name, String);
if (!this.userId) throw new Meteor.Error('not-logged-in');