ui: set empty defaults for clickmap

This commit is contained in:
nick-delirium 2025-02-20 11:40:35 +01:00
parent 0a4379be6b
commit 11824d2993
No known key found for this signature in database
GPG key ID: 93ABD695DF5FDBA0

View file

@ -314,6 +314,19 @@ export default class Widget {
}
if (this.metricType === HEATMAP) {
const defaults = {
domURL: undefined,
duration: 0,
events: [],
mobsUrl: [],
path: '',
projectId: 0,
sessionId: null,
startTs: 0
};
if (!data || !data.domURL) {
this.data = defaults;
}
Object.assign(this.data, data);
return;
}