Skip to content

Commit

Permalink
update function name
Browse files Browse the repository at this point in the history
Signed-off-by: tygao <tygao@amazon.com>
  • Loading branch information
raintygao committed Apr 11, 2024
1 parent a12bdb4 commit 32c5049
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/plugins/workspace/public/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export class WorkspacePlugin implements Plugin<{}, {}> {
private coreStart?: CoreStart;
private currentWorkspaceIdSubscription?: Subscription;
private currentWorkspaceSubscription?: Subscription;
private managementCurrentWorkspaceSubscription?: Subscription;
private managementCurrentWorkspaceIdSubscription?: Subscription;
private appUpdater$ = new BehaviorSubject<AppUpdater>(() => undefined);
private _changeSavedObjectCurrentWorkspace() {
if (this.coreStart) {
Expand Down Expand Up @@ -82,9 +82,9 @@ export class WorkspacePlugin implements Plugin<{}, {}> {
*/
private disableManagementApps(core: CoreSetup, management: ManagementSetup) {
const currentWorkspaceId$ = core.workspaces.currentWorkspaceId$;
this.managementCurrentWorkspaceSubscription?.unsubscribe();
this.managementCurrentWorkspaceIdSubscription?.unsubscribe();

this.managementCurrentWorkspaceSubscription = currentWorkspaceId$.subscribe(
this.managementCurrentWorkspaceIdSubscription = currentWorkspaceId$.subscribe(
(currentWorkspaceId) => {
if (currentWorkspaceId) {
const managementSectionApps = management.sections.section.opensearchDashboards.getAppsEnabled();
Expand Down Expand Up @@ -252,6 +252,6 @@ export class WorkspacePlugin implements Plugin<{}, {}> {
public stop() {
this.currentWorkspaceIdSubscription?.unsubscribe();
this.currentWorkspaceSubscription?.unsubscribe();
this.managementCurrentWorkspaceSubscription?.unsubscribe();
this.managementCurrentWorkspaceIdSubscription?.unsubscribe();
}
}

0 comments on commit 32c5049

Please sign in to comment.