Fix period selector in statistic card (#18131)

This commit is contained in:
karwosts 2023-10-09 05:41:27 -07:00 committed by GitHub
parent 294df396f4
commit 5a6d6dc7d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -196,7 +196,7 @@ export class HuiStatisticCardEditor
}
private async _valueChanged(ev: CustomEvent) {
const config = ev.detail.value as StatisticCardConfig;
const config = { ...ev.detail.value } as StatisticCardConfig;
Object.keys(config).forEach((k) => config[k] === "" && delete config[k]);
if (typeof config.period === "string") {