@logicflow/extension 2.0.4 → 2.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -420,7 +420,7 @@ function getLfEdges(value, bpmnEdges) {
420
420
  }
421
421
  function getEdgeConfig(edgeValue, processValue) {
422
422
  var text;
423
- var textVal = "".concat(processValue['-name']);
423
+ var textVal = processValue['-name'] ? "".concat(processValue['-name']) : '';
424
424
  if (textVal) {
425
425
  var textBounds = edgeValue['bpmndi:BPMNLabel']['dc:Bounds'];
426
426
  // 如果边文本换行,则其偏移量应该是最长一行的位置
@@ -878,7 +878,7 @@ function getLfEdges(value, bpmnEdges) {
878
878
  }
879
879
  function getEdgeConfig(edgeValue, processValue) {
880
880
  var text;
881
- var textVal = "".concat(processValue['-name']);
881
+ var textVal = processValue['-name'] ? "".concat(processValue['-name']) : '';
882
882
  if (textVal) {
883
883
  var textBounds = edgeValue['bpmndi:BPMNLabel']['dc:Bounds'];
884
884
  // 如果边文本换行,则其偏移量应该是最长一行的位置
@@ -425,7 +425,7 @@ function getLfEdges(value, bpmnEdges) {
425
425
  }
426
426
  function getEdgeConfig(edgeValue, processValue) {
427
427
  var text;
428
- var textVal = "".concat(processValue['-name']);
428
+ var textVal = processValue['-name'] ? "".concat(processValue['-name']) : '';
429
429
  if (textVal) {
430
430
  var textBounds = edgeValue['bpmndi:BPMNLabel']['dc:Bounds'];
431
431
  // 如果边文本换行,则其偏移量应该是最长一行的位置
@@ -886,7 +886,7 @@ function getLfEdges(value, bpmnEdges) {
886
886
  }
887
887
  function getEdgeConfig(edgeValue, processValue) {
888
888
  var text;
889
- var textVal = "".concat(processValue['-name']);
889
+ var textVal = processValue['-name'] ? "".concat(processValue['-name']) : '';
890
890
  if (textVal) {
891
891
  var textBounds = edgeValue['bpmndi:BPMNLabel']['dc:Bounds'];
892
892
  // 如果边文本换行,则其偏移量应该是最长一行的位置
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@logicflow/extension",
3
- "version": "2.0.4",
3
+ "version": "2.0.5",
4
4
  "description": "LogicFlow Extensions",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",
@@ -429,7 +429,7 @@ function getLfEdges(value, bpmnEdges) {
429
429
 
430
430
  function getEdgeConfig(edgeValue, processValue): EdgeConfig {
431
431
  let text
432
- const textVal = `${processValue['-name']}`
432
+ const textVal = processValue['-name'] ? `${processValue['-name']}` : ''
433
433
  if (textVal) {
434
434
  const textBounds = edgeValue['bpmndi:BPMNLabel']['dc:Bounds']
435
435
  // 如果边文本换行,则其偏移量应该是最长一行的位置
@@ -923,7 +923,7 @@ function getLfEdges(value: any, bpmnEdges: any) {
923
923
 
924
924
  function getEdgeConfig(edgeValue: any, processValue: any) {
925
925
  let text
926
- const textVal = `${processValue['-name']}`
926
+ const textVal = processValue['-name'] ? `${processValue['-name']}` : ''
927
927
  if (textVal) {
928
928
  const textBounds = edgeValue['bpmndi:BPMNLabel']['dc:Bounds']
929
929
  // 如果边文本换行,则其偏移量应该是最长一行的位置