Skip to content

getDom gets number of tasks before checking if any tasks exists - throws NULL error #16

Description

@ruff-hi

You need to move the numTasks line to the 'else' part of if any tasks statement.

getDom: function() {
	var wrapper = document.createElement('div');
	wrapper.className = "container ";
	wrapper.className += this.config.tableClass;

	if (!this.tasks) {
		wrapper.innerHTML = (this.loaded) ? "EMPTY" : "LOADING";
		wrapper.className = this.config.tableClass + " dimmed";
		return wrapper;
	} else {
		var numTasks = Object.keys(this.tasks).length;
	}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions