Skip to content

Commit 06d418b

Browse files
committed
Fix createWorkspace Meteor method fails with "Expected string, got undefined"
Thanks to TheBoysenBuilds and xet7 ! Fixes #6150
1 parent f6f1660 commit 06d418b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

models/users.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1948,7 +1948,9 @@ Meteor.methods({
19481948
user.toggleDesktopHandles(user.hasShowDesktopDragHandles());
19491949
},
19501950
// Spaces: create a new space under parentId (or root when null)
1951-
createWorkspace({ parentId = null, name }) {
1951+
createWorkspace(params) {
1952+
check(params, Object);
1953+
const { parentId = null, name } = params;
19521954
check(parentId, Match.OneOf(String, null));
19531955
check(name, String);
19541956
if (!this.userId) throw new Meteor.Error('not-logged-in');

0 commit comments

Comments
 (0)