MMM-GoogleTasks
MMM-GoogleTasks copied to clipboard
getDom gets number of tasks before checking if any tasks exists - throws NULL error
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;
}