Skip to content

Commit 19e4aaa

Browse files
feat: fix tests
1 parent d03c1b4 commit 19e4aaa

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

packages/field-plugin/src/messaging/pluginMessage/containerToPluginMessage/LoadedMessage.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ export const isLoadedMessage = (data: unknown): data is LoadedMessage =>
4040
hasKey(data, 'userId') &&
4141
(typeof data.userId === 'number' || typeof data.userId === 'undefined') &&
4242
hasKey(data, 'userPermissions') &&
43+
data.userPermissions !== null &&
4344
(typeof data.userPermissions === 'object' ||
4445
typeof data.userPermissions === 'undefined') &&
4546
hasKey(data, 'isSpaceAdmin') &&

packages/field-plugin/src/messaging/pluginMessage/containerToPluginMessage/StateChangedMessage.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ export const isStateMessage = (data: unknown): data is StateChangedMessage =>
4040
hasKey(data, 'userId') &&
4141
(typeof data.userId === 'number' || typeof data.userId === 'undefined') &&
4242
hasKey(data, 'userPermissions') &&
43+
data.userPermissions !== null &&
4344
(typeof data.userPermissions === 'object' ||
4445
typeof data.userPermissions === 'undefined') &&
4546
hasKey(data, 'isSpaceAdmin') &&

0 commit comments

Comments
 (0)