Open Robert-Black opened 2 months ago
your command probably encounters an error and output
is undefined in that case. You can do two things:
Just make sure that output
is defined
export const render = ({output}) => {
if (output == null) return null;
...
}
or check whether there is an error and then display it. That way you might be able to figure out what the issue is:
export const render = ({output, error}) => {
if (error != null) return <div>{JSON.stringify(error)}</div>;
....
}
Thanks! I'll give that a try and report back.
Curious. Here's the result…
your output must be empty in some cases, so maybe best to combine both approaches:
export const render = ({output, error}) => {
if (error != null) return <div>{JSON.stringify(error)}</div>;
if (!output) return null;
....
}
That did the trick! Thank you.
BTW, switched to Sequoia today, and Übersicht hasn't skipped a beat.
This is probably my bad coding, but I’m seeing an odd intermittent (but frequent enough to be annoying) error with Übersicht…
Multiple times a day, I get an error panel on my desktop, but if I refresh Übersicht it disappears only to reappear randomly-ish later, and then tends to stay around until I do a manual refresh.
At first I thought it might be the a problem with the shell command being run, having some sort of race condition, but I’ve verified that this still happens without the shell command, so that means there’s either a silly bug in my code, or my code is triggering something within Übersicht. My money’s on the former, so can anyone see where the problem is? The intermittent nature of it has me stumped ¯\_(ツ)_/¯
I almost forgot to add, I have the widget on multiple monitors, and sometimes the error only appears on one monitor, sometimes on both.