<commit_before>var Crafty = require('./core.js'),
    document = window.document;

/**@
 * #Color
 * @category Graphics
 * Draw a solid color for the entity
 */
Crafty.c("Color", {
    _color: "",
    ready: true,

    init: function () {
        this.bind("Draw", function (e) {
            if (e.type === "DOM") {
                e.style.backgroundColor = this._color;
                e.style.lineHeight = 0;
            } else if (e.type === "canvas") {
                if (this._color) e.ctx.fillStyle = this._color;
                e.ctx.fillRect(e.pos._x, e.pos._y, e.pos._w, e.pos._h);
            }
        });
    },
<commit_msg>if no color is assigned, the Color component should do nothing whatsoever<commit_after>var Crafty = require('./core.js'),
    document = window.document;

/**@
 * #Color
 * @category Graphics
 * Draw a solid color for the entity
 */
Crafty.c("Color", {
    _color: "",
    ready: true,

    init: function () {
        this.bind("Draw", function (e) {
            if (!this._color) { return; }
            if (e.type === "DOM") {
                e.style.backgroundColor = this._color;
                e.style.lineHeight = 0;
            } else if (e.type === "canvas") {
                e.ctx.fillStyle = this._color;
                e.ctx.fillRect(e.pos._x, e.pos._y, e.pos._w, e.pos._h);
            }
        });
    },

{'fraction_non_alphanumeric': 0.1623806024981631, 'fraction_numerical': 0.0014695077149155032, 'mean_word_length': 1.718562874251497, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1946992', 'n_tokens_mistral': 443, 'n_tokens_neox': 424, 'n_words': 98}