handle nil tag color

This commit is contained in:
Mikayla Fischler 2022-07-05 11:18:07 -04:00
parent 7ad115bc03
commit ed0982a832

View File

@ -150,10 +150,10 @@ function log.dmesg(msg, tag, tag_color)
out.setTextColor(colors.white)
out.write("] ")
-- colored tag
-- print optionally colored tag
if tag ~= "" then
out.write("[")
out.setTextColor(tag_color)
if tag_color then out.setTextColor(tag_color) end
out.write(tag)
out.setTextColor(colors.white)
out.write("] ")