@gamelearn/arcade-components 1.4.14 → 1.4.15

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.
@@ -251,14 +251,19 @@ var ConversationProViewer = function ConversationProViewer(_ref) {
251
251
  var currentEdge = optionsEdges.find(function (edge) {
252
252
  return parseInt(edge.fromPointIndex) === currentId;
253
253
  });
254
- var destinationEdge = lines.findIndex(function (l) {
255
- return l.id === currentEdge.toId;
256
- });
257
254
 
258
- if (currentEdge.fromId === currentEdge.toId) {
259
- reset();
260
- } else if (destinationEdge >= 0) {
261
- setCurrentLine(destinationEdge);
255
+ if (currentEdge) {
256
+ var destinationEdge = lines.findIndex(function (l) {
257
+ return l.id === currentEdge.toId;
258
+ });
259
+
260
+ if (currentEdge.fromId === currentEdge.toId) {
261
+ reset();
262
+ } else if (destinationEdge >= 0) {
263
+ setCurrentLine(destinationEdge);
264
+ } else {
265
+ finishConversation();
266
+ }
262
267
  } else {
263
268
  finishConversation();
264
269
  }
@@ -330,11 +330,15 @@ var DialogComponent = function DialogComponent(_ref) {
330
330
  return l.id === currentEdge.toId;
331
331
  });
332
332
 
333
- if (currentEdge.fromId === currentEdge.toId) {
334
- reset();
335
- } else if (destinationEdge >= 0) {
336
- setCurrentMessage({});
337
- changeLine(destinationEdge);
333
+ if (destinationEdge) {
334
+ if (currentEdge.fromId === currentEdge.toId) {
335
+ reset();
336
+ } else if (destinationEdge >= 0) {
337
+ setCurrentMessage({});
338
+ changeLine(destinationEdge);
339
+ } else {
340
+ finishConversation();
341
+ }
338
342
  } else {
339
343
  finishConversation();
340
344
  }
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@gamelearn/arcade-components",
3
3
  "author": "Gamelearn",
4
4
  "license": "unlicense",
5
- "version": "1.4.14",
5
+ "version": "1.4.15",
6
6
  "main": "dist/index.js",
7
7
  "files": [
8
8
  "dist",