yocto_console_view: Fix onNew update logic and drop pointless return values

The logic in the function was odd, we need to trigger onChange if we update
any values. The return values are also pointless. Fix and clean up the code
logic accordingly.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Purdie 2020-11-29 11:01:26 +00:00
parent 9562761148
commit eacbfed5b4

View File

@ -142,16 +142,16 @@ class Console {
const branch = this.getBuildProperty(properties[0], 'yp_build_branch');
if (branch != null) {
this.branchmapping[buildid] = branch;
change = true;
}
return change = true;
}
};
if (change && (this.onchange_debounce == null)) {
this.onchange_debounce = this.$timeout(this._onChange, 100);
}
};
}
if (change && (this.onchange_debounce == null)) {
return this.onchange_debounce = this.$timeout(this._onChange, 100);
this.onchange_debounce = this.$timeout(this._onChange, 100);
}
};
}