Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure dataInfo exists before parsing. Fixes #1944 #1945

Merged
merged 1 commit into from
Oct 1, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Ensure dataInfo exists before parsing. Fixes #1944
  • Loading branch information
brollb committed Oct 1, 2020
commit c95bd69eb3cb1a8cfa5cdfc0c54430a7fdfe1af0
5 changes: 3 additions & 2 deletions src/visualizers/panels/TrainKeras/TrainKerasControl.js
Original file line number Diff line number Diff line change
Expand Up @@ -420,17 +420,18 @@ define([
if (node) {
return node.getAttribute('data');
}
return true;
return false;
}

getObjectDescriptor(nodeId) {
const node = this.client.getNode(nodeId);
const name = node.getAttribute('name').replace(/\..*$/, '');
const dataInfo = node.getAttribute('data');
return {
id: nodeId,
name,
type: node.getAttribute('type'),
dataInfo: JSON.parse(node.getAttribute('data')),
dataInfo: dataInfo && JSON.parse(dataInfo),
};
}
}
Expand Down