Skip to content

Commit

Permalink
fix: fix error in instance view if node id is not a string
Browse files Browse the repository at this point in the history
  • Loading branch information
csm-thu committed Jun 18, 2024
1 parent 2b57627 commit 5689191
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/views/Instance/data.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
getDefaultHiddenStyle,
} from './styleCytoViz';

const _formatLabelWithNewlines = (label) => label?.replace(/[_|\s]/g, '\n') || '';
const _formatLabelWithNewlines = (label) => String(label ?? '').replace(/[_|\s]/g, '\n');

const _forgeCytoscapeNodeData = (node, classes, nodesGroupMetadata = {}, nodesParentsDict = {}) => {
const parent = nodesParentsDict[node.id];
Expand Down

0 comments on commit 5689191

Please sign in to comment.