File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
lib/js/src/manager/permission Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -37,6 +37,7 @@ import { PermissionGroupStatus } from './enums/PermissionGroupStatus.js';
3737import { PermissionStatus } from './PermissionStatus.js' ;
3838import { FunctionID } from '../../rpc/enums/FunctionID.js' ;
3939import { PredefinedWindows } from '../../rpc/enums/PredefinedWindows.js' ;
40+ import { PermissionItem } from '../../rpc/structs/PermissionItem.js' ;
4041
4142class _PermissionManagerBase extends _SubManagerBase {
4243 /**
@@ -64,7 +65,11 @@ class _PermissionManagerBase extends _SubManagerBase {
6465
6566 this . _onPermissionsChangeListener = ( notification ) => {
6667 const permissionItems = notification . getPermissionItem ( ) ;
67- const previousPermissionItems = JSON . parse ( JSON . stringify ( this . _currentPermissionItems ) ) ;
68+ const previousPermissionItemsJson = JSON . parse ( JSON . stringify ( this . _currentPermissionItems ) ) ;
69+ const previousPermissionItems = { } ;
70+ Object . entries ( previousPermissionItemsJson ) . map ( ( [ functionId , permissionObject ] ) => {
71+ previousPermissionItems [ functionId ] = new PermissionItem ( permissionObject . _parameters ) ;
72+ } ) ;
6873 const requireEncryptionAppLevel = notification . getRequireEncryption ( ) ;
6974
7075 // clear the entire _encryptionRequiredRpcs array to be repopulated
You can’t perform that action at this time.
0 commit comments