Skip to content

Commit

Permalink
Merge pull request #745 from finos/phosphor_bugfix
Browse files Browse the repository at this point in the history
Fix empty list in phosphor plugin
  • Loading branch information
texodus authored Sep 29, 2019
2 parents a5fd196 + 04c6056 commit de59d3e
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions packages/perspective-phosphor/src/ts/widget.ts
Original file line number Diff line number Diff line change
Expand Up @@ -310,11 +310,15 @@ export
this.pspNode.load(this.schema as Schema, options as TableOptions);
}

if (Array.isArray(data) && data.length > 0) {
if (this._wrap) {
this.pspNode.update([data]);
if (Array.isArray(data)) {
if (data.length > 0) {
if (this._wrap) {
this.pspNode.update([data]);
} else {
this.pspNode.update(data);
}
} else {
this.pspNode.update(data);
console.warn('Perspective received length 0 data');
}
} else {
if(Object.keys(data)){
Expand Down

0 comments on commit de59d3e

Please sign in to comment.