Skip to content

Commit 2a5206a

Browse files
committed
tc
1 parent a4e68d5 commit 2a5206a

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

torchci/components/HudGroupingSettings/MainPageSettings.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ import {
3434
isDupName,
3535
saveTreeData,
3636
} from "./mainPageSettingsUtils";
37+
import { tree } from "d3";
3738

3839
function validRegex(value: string) {
3940
try {

torchci/components/HudGroupingSettings/mainPageSettingsUtils.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
import _ from "lodash";
2+
import { getDefaultGroupSettings } from "./defaults";
3+
14
export type Group = {
25
name: string;
36
regex: RegExp;
@@ -17,12 +20,12 @@ export function saveTreeData(treeData: Group[]) {
1720
localStorage.setItem("hud_group_settings", setting);
1821
}
1922

20-
export function getStoredTreeData(): Group[] {
23+
export function getStoredTreeData(): Group[]{
2124
try {
2225
// Try to load saved tree data from localStorage
2326
const stored = localStorage.getItem("hud_group_settings");
2427

25-
if (!stored) return [];
28+
if (!stored) return getDefaultGroupSettings();
2629

2730
const parsed = JSON.parse(stored);
2831

0 commit comments

Comments
 (0)