diff --git a/code/datums/datumvars.dm b/code/datums/datumvars.dm
index 0a71929d155..1a549647d8d 100644
--- a/code/datums/datumvars.dm
+++ b/code/datums/datumvars.dm
@@ -386,7 +386,10 @@ body
html += "
"
var/index = 1
for(var/entry in L)
- html += debug_variable(index, L[index], level + 1)
+ if(istext(entry))
+ html += debug_variable(entry, L[index], level + 1)
+ else
+ html += debug_variable(index, L[index], level + 1)
index++
html += "
"