summaryrefslogtreecommitdiff
path: root/js/lex.js
diff options
context:
space:
mode:
authorJules <jules@asdf.us>2016-04-09 01:00:57 -0400
committerJules <jules@asdf.us>2016-04-09 01:00:57 -0400
commita396ed84ead4d55a6edd57731205db6274740439 (patch)
treed40bf66f3cdfb958fbe066480fa1ab24c9648fc5 /js/lex.js
parent21db010c116bad9949b1e5df8ea1a86c3747223d (diff)
repair cc if values become weird
Diffstat (limited to 'js/lex.js')
-rw-r--r--js/lex.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/js/lex.js b/js/lex.js
index 308f666..20c801b 100644
--- a/js/lex.js
+++ b/js/lex.js
@@ -14,6 +14,8 @@ function Lex (x,y) {
this.focused = false
}
Lex.prototype.build = function(){
+ if (isNaN(this.bg) || this.bg == Infinity || this.bg == -Infinity) this.bg = colors.black
+ if (isNaN(this.fg) || this.fg == Infinity || this.fg == -Infinity) this.fg = colors.black
this.span.className = this.css()
this.span.innerHTML = this.html()
}