Skip to content

Commit

Permalink
examples appear again (#789)
Browse files Browse the repository at this point in the history
  • Loading branch information
ostatni5 committed Feb 9, 2023
1 parent 477916a commit 763f84b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions src/ThreeEditor/examples/examples.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import {
FinalSimulationStatusData,
recreateRefsInResults,
SimulationStatusData
recreateRefsInResults
} from '../../services/ShSimulatorService';
import { EditorJson } from '../js/EditorJson';

let canImport = true;
let iterator = 1;
Expand All @@ -14,13 +12,15 @@ while (canImport) {
if (!(example.editor.project.title && example.editor.project.title.length > 0))
example.editor.project.title = `Untitled example ${iterator}`;

recreateRefsInResults(example);

EXAMPLES.push(example);
iterator++;
} catch (e) {
canImport = false;
}
}

for (const example of EXAMPLES) {
recreateRefsInResults(example);
}

export default EXAMPLES;
6 changes: 3 additions & 3 deletions src/util/Sort.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ export const orderAccordingToList = <A extends C, B extends C, C extends Common<
continue;
}

listOrdered.push(listCopy[index]);
listCopy.splice(index, 1);

foundCallback?.call(null, listCopy[index], orderElement);

listOrdered.push(listCopy[index]);
listCopy.splice(index, 1);
}

if (listCopy.length > 0) {
Expand Down

0 comments on commit 763f84b

Please sign in to comment.