Skip to content

Commit

Permalink
fix: set title
Browse files Browse the repository at this point in the history
  • Loading branch information
sametcn99 committed May 31, 2024
1 parent 4442565 commit d7e5dfb
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/utils/browser-windows/widget-windows.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ export function createWindowsForWidgets() {
return;
}
// Iterate through each widget in the data
Object.entries(widgetsData).forEach(async ([key, widget]) => {
Object.entries(widgetsData).forEach(([key, widget]) => {
// Merge the widget with the preset values
widgetsData[key] = mergeWithPreset(widget, preset);
setWidgetsJson(widgetsData, config.widgetsJsonPath);
// Check if the widget is set to be visible
if (widget.visible) {
await createSingleWindowForWidgets(key);
createSingleWindowForWidgets(key);
}
});
} catch (err) {
Expand Down Expand Up @@ -95,9 +95,9 @@ export async function createSingleWindowForWidgets(key: string) {

// Load the widget's HTML file into the window
const indexPath = path.join(config.widgetsDir, key, "index.html");
await win.loadFile(indexPath);
if (win.title !== key) {
win.setTitle(key);
await win.loadFile(indexPath);
if(win.title !== key){
win.setTitle(key);
}
openDevToolsWithShortcut(win);
} catch (err) {
Expand Down

0 comments on commit d7e5dfb

Please sign in to comment.