Skip to content

Commit

Permalink
feat: optimize code
Browse files Browse the repository at this point in the history
Signed-off-by: SuZhou-Joe <[email protected]>
  • Loading branch information
SuZhou-Joe committed Oct 7, 2023
1 parent 69b06f6 commit 7a4a79b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/plugins/workspace/public/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,8 @@ export class WorkspacesPlugin implements Plugin<{}, {}> {
/**
* Patch workspace id into path
*/
const currentWorkspaceId = workspaceId;
newUrl.pathname = this.core?.http.basePath.remove(newUrl.pathname) || '';
if (currentWorkspaceId) {
if (workspaceId) {
newUrl.pathname = `${this.core?.http.basePath.serverBasePath || ''}/w/${workspaceId}${
newUrl.pathname
}`;
Expand Down

0 comments on commit 7a4a79b

Please sign in to comment.