fix(cloner): Fix empty devices list due to RPC expect unwrapping
RPC declarations with expect: { field: [] } unwrap the response,
so data[n] IS the array, not data[n].field.
Changed:
- this.images = data[1] || []
- this.tokens = data[2] || []
- this.clones = data[3] || []
- this.devices = data[4] || []
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
417a572338
commit
b1c9abe5cf
@ -106,10 +106,11 @@ return view.extend({
|
|||||||
render: function(data) {
|
render: function(data) {
|
||||||
var self = this;
|
var self = this;
|
||||||
this.status = data[0] || {};
|
this.status = data[0] || {};
|
||||||
this.images = data[1].images || [];
|
// RPC expect unwraps the arrays, so data[n] IS the array
|
||||||
this.tokens = data[2].tokens || [];
|
this.images = data[1] || [];
|
||||||
this.clones = data[3].clones || [];
|
this.tokens = data[2] || [];
|
||||||
this.devices = data[4].devices || [];
|
this.clones = data[3] || [];
|
||||||
|
this.devices = data[4] || [];
|
||||||
this.buildProgress = data[5] || {};
|
this.buildProgress = data[5] || {};
|
||||||
|
|
||||||
var content = [
|
var content = [
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user