Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { UmbBlockDataModel, UmbBlockDataValueModel, UmbBlockLayoutBaseModel } from '../types.js';

Check notice on line 1 in src/Umbraco.Web.UI.Client/src/packages/block/block/workspace/block-workspace.context.ts

View check run for this annotation

CodeScene Delta Analysis / CodeScene Code Health Review (main)

✅ No longer an issue: String Heavy Function Arguments

The ratio of strings in function arguments is no longer above the threshold
import { UMB_BLOCK_ENTRIES_CONTEXT, UMB_BLOCK_MANAGER_CONTEXT } from '../context/index.js';
import { UmbBlockWorkspaceEditorElement } from './block-workspace-editor.element.js';
import { UmbBlockElementManager } from './block-element-manager.js';
Expand Down Expand Up @@ -313,11 +313,14 @@
/**
* Check if the workspace is about to navigate away.
* @protected
* @param {string} newUrl The new url that the workspace is navigating to.
* @returns { boolean} true if the workspace is navigating away.
* @param {string | URL} newUrl The new url that the workspace is navigating to.
* @returns {boolean} true if the workspace is navigating away.
* @memberof UmbEntityWorkspaceContextBase
*/
protected _checkWillNavigateAway(newUrl: string): boolean {
protected _checkWillNavigateAway(newUrl: string | URL): boolean {
if (newUrl instanceof URL) {
newUrl = newUrl.href;
}
return !newUrl.includes(this.routes.getActiveLocalPath());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -376,11 +376,14 @@ export abstract class UmbEntityDetailWorkspaceContextBase<
/**
* Check if the workspace is about to navigate away.
* @protected
* @param {string} newUrl The new url that the workspace is navigating to.
* @returns { boolean} true if the workspace is navigating away.
* @param {string | URL} newUrl The new url that the workspace is navigating to.
* @returns {boolean} true if the workspace is navigating away.
* @memberof UmbEntityWorkspaceContextBase
*/
protected _checkWillNavigateAway(newUrl: string): boolean {
protected _checkWillNavigateAway(newUrl: string | URL): boolean {
if (newUrl instanceof URL) {
newUrl = newUrl.href;
}
return !newUrl.includes(this.routes.getActiveLocalPath());
}

Expand Down
Loading