Skip to content

Commit bd9d96d

Browse files
danbriafri
authored andcommitted
oopsie, try/catch works better.
1 parent aba6711 commit bd9d96d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

dashboard.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,10 +179,10 @@
179179
img.src= u;
180180
img.height=150;
181181

182-
if (d.firstChild != null) {
182+
try {
183183
print("replacing image for "+rand_no);
184184
d.replaceChild(d.firstChild, img);
185-
} else {
185+
} catch(e) {
186186
print("creating first image for "+rand_no);
187187
d.appendChild(img);
188188
}

0 commit comments

Comments
 (0)