Skip to content

Commit

Permalink
fix eslint
Browse files Browse the repository at this point in the history
Signed-off-by: Hailong Cui <ihailong@amazon.com>
  • Loading branch information
Hailong-am committed Jul 14, 2023
1 parent 71768d6 commit 950210c
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/plugins/workspace/public/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
*/

import { i18n } from '@osd/i18n';
import type { Subscription } from 'rxjs';
import {
CoreSetup,
CoreStart,
Expand All @@ -14,7 +15,6 @@ import {
import { WORKSPACE_APP_ID } from '../common/constants';
import { mountDropdownList } from './mount';
import { getWorkspaceIdFromUrl } from '../../../core/public/utils';
import type { Subscription } from 'rxjs';
import { SavedObjectsManagementPluginSetup } from '../../saved_objects_management/public';
import { getWorkspaceColumn } from './components/utils/workspace_column';

Expand All @@ -27,7 +27,6 @@ export class WorkspacesPlugin implements Plugin<{}, {}, WorkspacesPluginSetupDep
private coreStart?: CoreStart;
private currentWorkspaceSubscription?: Subscription;


private getWorkspaceIdFromURL(): string | null {
return getWorkspaceIdFromUrl(window.location.href);
}
Expand All @@ -39,8 +38,9 @@ export class WorkspacesPlugin implements Plugin<{}, {}, WorkspacesPluginSetupDep
*/
newUrl.pathname = this.coreSetup?.http.basePath.remove(newUrl.pathname) || '';
if (workspaceId) {
newUrl.pathname = `${this.coreSetup?.http.basePath.serverBasePath || ''}/w/${workspaceId}${newUrl.pathname
}`;
newUrl.pathname = `${this.coreSetup?.http.basePath.serverBasePath || ''}/w/${workspaceId}${
newUrl.pathname
}`;
} else {
newUrl.pathname = `${this.coreSetup?.http.basePath.serverBasePath || ''}${newUrl.pathname}`;
}
Expand All @@ -67,9 +67,9 @@ export class WorkspacesPlugin implements Plugin<{}, {}, WorkspacesPluginSetupDep
if (!result.success) {
core.fatalErrors.add(
result.error ||
i18n.translate('workspace.error.setup', {
defaultMessage: 'Workspace init failed',
})
i18n.translate('workspace.error.setup', {
defaultMessage: 'Workspace init failed',
})
);
}
}
Expand Down

0 comments on commit 950210c

Please sign in to comment.