|
@@ -76,10 +76,12 @@ async function loopData({ data, id }, { refData }) {
|
|
|
throw new Error('invalid-loop-data');
|
|
|
}
|
|
|
|
|
|
+ const startIndex = +data.startIndex;
|
|
|
+
|
|
|
if (data.resumeLastWorkflow && this.engine.isPopup) {
|
|
|
index = JSON.parse(localStorage.getItem(`index:${id}`)) || 0;
|
|
|
- } else if (data.startIndex > 0) {
|
|
|
- index = data.startIndex;
|
|
|
+ } else if (!Number.isNaN(startIndex) && startIndex > 0) {
|
|
|
+ index = startIndex;
|
|
|
}
|
|
|
|
|
|
if (data.reverseLoop && data.loopThrough !== 'elements') {
|