Skip to content

Commit dd9a4f4

Browse files
afgarcia861egoman
andauthored
fix(react): handle renamed key in room options serializer (#1312)
Co-authored-by: Ryan Gaus <rsg1egoman@gmail.com>
1 parent 9cd2970 commit dd9a4f4

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

.changeset/wide-moments-wear.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@livekit/components-react': patch
3+
---
4+
5+
Handle renamed e2ee -> encryption key in room options serializer

packages/react/src/utils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,13 +65,13 @@ export function warnAboutMissingStyles(el?: HTMLElement) {
6565
*
6666
* @internal
6767
* used to stringify room options to detect dependency changes for react hooks.
68-
* Replaces processors and e2ee options with strings.
68+
* Replaces processors and e2ee/encryption options with strings.
6969
*/
7070
export function roomOptionsStringifyReplacer(key: string, val: unknown) {
7171
if (key === 'processor' && val && typeof val === 'object' && 'name' in val) {
7272
return val.name;
7373
}
74-
if (key === 'e2ee' && val) {
74+
if ((key === 'e2ee' || key === 'encryption') && val) {
7575
return 'e2ee-enabled';
7676
}
7777
return val;

0 commit comments

Comments
 (0)