fix(tracker): fix srcset tracking

This commit is contained in:
sylenien 2022-06-23 11:13:32 +02:00 committed by Delirium
parent af23769d74
commit 3607f45f8a

View file

@ -23,7 +23,7 @@ export default function (app: App): void {
if (id === undefined) {
return;
}
const { src, complete, naturalWidth, naturalHeight } = this;
const { src, complete, naturalWidth, naturalHeight, srcset } = this;
if (!complete) {
return;
}
@ -35,6 +35,7 @@ export default function (app: App): void {
sendPlaceholder(id, this)
} else {
app.send(new SetNodeAttributeURLBased(id, 'src', src, app.getBaseHref()));
app.send(new SetNodeAttributeURLBased(id, 'srcset', srcset, app.getBaseHref()));
}
});