mirror of
https://github.com/wavetermdev/waveterm.git
synced 2024-12-21 16:38:23 +01:00
null pointer defense for widgets. log settings.json at startup in console
This commit is contained in:
parent
d892bbc372
commit
741ea2d0ae
@ -83,7 +83,7 @@ const Widgets = React.memo(() => {
|
||||
</div>
|
||||
<div className="widget-label">home</div>
|
||||
</div>
|
||||
{settingsConfig.widgets.map((data, idx) => (
|
||||
{settingsConfig?.widgets?.map((data, idx) => (
|
||||
<div
|
||||
className="widget"
|
||||
onClick={() => handleWidgetSelect(data.blockdef)}
|
||||
|
@ -35,7 +35,9 @@ document.addEventListener("DOMContentLoaded", async () => {
|
||||
const initialTab = await WOS.loadAndPinWaveObject<Tab>(WOS.makeORef("tab", waveWindow.activetabid));
|
||||
WOS.loadAndPinWaveObject<LayoutNode>(WOS.makeORef("layout", initialTab.layoutNode));
|
||||
initWS();
|
||||
globalStore.set(atoms.settingsConfigAtom, await services.FileService.GetSettingsConfig());
|
||||
const settings = await services.FileService.GetSettingsConfig();
|
||||
console.log("settings", settings);
|
||||
globalStore.set(atoms.settingsConfigAtom, settings);
|
||||
services.ObjectService.SetActiveTab(waveWindow.activetabid); // no need to wait
|
||||
const reactElem = React.createElement(App, null, null);
|
||||
const elem = document.getElementById("main");
|
||||
|
Loading…
Reference in New Issue
Block a user