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,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">

<PropertyGroup>
<Version>10.0.3</Version>
<Version>10.0.4-beta01</Version>
</PropertyGroup>

<PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ const onAddGroup = group => {
dockview._inited && observeGroup(group)
}

const addGroupWithPanel = (dockview, panel, panels, index) => {
const addGroupWithPanel = (dockview, panel, localPanel, panels, index) => {
if (panel.groupId) {
addPanelWidthGroupId(dockview, panel, index)
}
else {
addPanelWidthCreatGroup(dockview, panel, panels)
}
deletePanel(dockview, panel)
deletePanel(dockview, localPanel)
Comment on lines +29 to +36
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue (bug_risk): Guard against localPanel being undefined before calling deletePanel.

With the new signature, localPanel may be undefined when panels.find(...) in the caller fails, leading to deletePanel(dockview, undefined). Please either guard before calling (e.g. if (localPanel) deletePanel(...)) or ensure the caller always provides a valid panel reference.

}

const addPanelWidthGroupId = (dockview, panel, index) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ const toggleComponent = (dockview, options) => {
let indexOfOptions = groupPanels.findIndex(p => p.params.key == panel?.params.key)
indexOfOptions = indexOfOptions == -1 ? 0 : indexOfOptions
const index = panel && panel.params.index
addGroupWithPanel(dockview, panel || p, panels, index ?? indexOfOptions);
addGroupWithPanel(dockview, p || panel, panel, panels, index ?? indexOfOptions);
}
})

Expand Down
Loading