We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0ef4dd9 commit 62f9f17Copy full SHA for 62f9f17
src/models/PolicyList.ts
@@ -162,7 +162,7 @@ class PolicyList extends EventEmitter {
162
};
163
// Guard room type in case someone overwrites it when declaring custom creation_content in future code.
164
const roomType = finalRoomCreateOptions.creation_content?.type;
165
- if (typeof roomType === 'string' && !PolicyList.ROOM_TYPE_VARIANTS.includes(roomType)) {
+ if (typeof roomType !== 'string' || !PolicyList.ROOM_TYPE_VARIANTS.includes(roomType)) {
166
throw new TypeError(`Creating a policy room with a type other than the policy room type is not supported, you probably don't want to do this.`);
167
}
168
const listRoomId = await client.createRoom(finalRoomCreateOptions);
0 commit comments