Fix pfp error loading
This commit is contained in:
parent
062ddda3d9
commit
0bc1120c37
2 changed files with 4 additions and 0 deletions
|
@ -13,6 +13,7 @@ function view_dm_update(model) {
|
|||
if (!gel) {
|
||||
gel = new_el_dmgroup(model, dm);
|
||||
gel.addEventListener("click", onclick_dm);
|
||||
find_node("img.pfp", gel).addEventListener("error", onerror_pfp);
|
||||
el.appendChild(gel);
|
||||
}
|
||||
update_el_dmgroup(model, dm, gel);
|
||||
|
|
|
@ -329,6 +329,9 @@ function view_render_event(model, ev, force=false) {
|
|||
div.innerHTML = html;
|
||||
const el = div.firstChild;
|
||||
model.elements[ev.id] = el;
|
||||
const pfp = find_node("img.pfp", el)
|
||||
if (pfp)
|
||||
pfp.addEventListener("error", onerror_pfp);
|
||||
return el;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue