Skip to content

Commit d7f60ce

Browse files
Merge pull request #16 from technote-space/release/next-v0.1.5
release: v0.1.6
2 parents 30624f9 + e11977b commit d7f60ce

3 files changed

Lines changed: 10 additions & 8 deletions

File tree

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@technote-space/ga-framework",
3-
"version": "0.1.5",
3+
"version": "0.1.6",
44
"description": "GA Framework",
55
"author": {
66
"name": "Technote",
@@ -34,7 +34,7 @@
3434
"@material-ui/core": "^4.10.0",
3535
"@mui-treasury/layout": "^4.2.2",
3636
"@technote-space/genetic-algorithms-js": "^0.5.0",
37-
"@technote-space/worker-controller": "^0.3.0",
37+
"@technote-space/worker-controller": "^0.3.1",
3838
"clsx": "^1.1.1",
3939
"keycharm": "^0.3.1",
4040
"moment": "^2.26.0",

src/app/logic/Process/Process.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ global['Process'] = class Process extends ProcessBase<any> {
1212

1313
importScripts(context['path'] ?? 'algorithm.js');
1414
this.algorithm = new global[context['className'] ?? 'GeneticAlgorithm'](callback, context['data'] ?? undefined);
15-
this.algorithm.reset().then();
1615
}
1716

1817
public get isFinished(): boolean {
@@ -25,7 +24,10 @@ global['Process'] = class Process extends ProcessBase<any> {
2524

2625
// eslint-disable-next-line @typescript-eslint/no-explicit-any
2726
public reset(context: any): Promise<void> {
28-
this.algorithm = new global[context['className'] ?? 'GeneticAlgorithm'](this.callback, context['data'] ?? undefined);
27+
if (context) {
28+
this.algorithm = new global[context['className'] ?? 'GeneticAlgorithm'](this.callback, context['data'] ?? undefined);
29+
}
30+
2931
return this.algorithm.reset();
3032
}
3133

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1217,10 +1217,10 @@
12171217
resolved "https://registry.yarnpkg.com/@technote-space/genetic-algorithms-js/-/genetic-algorithms-js-0.5.0.tgz#9d1e6f202cabd8b490995333a9b8d402e4b34a5b"
12181218
integrity sha512-j9xsKnABVVLpkyVdNbR3KTG6zJbCFzuW8fDWa3Hmt4itiOvJURtFUQNpuC5PvVOR4aevZPD3BnOO2dsbzbfJow==
12191219

1220-
"@technote-space/worker-controller@^0.3.0":
1221-
version "0.3.0"
1222-
resolved "https://registry.yarnpkg.com/@technote-space/worker-controller/-/worker-controller-0.3.0.tgz#b3b2d91c0b57b1c8279d2846de394d744d651137"
1223-
integrity sha512-IR0YC42cz8od/7ACTJiAFUbTMlA7fKLUsaEygFGQs9AU8pYBE6REzkTmWCFeRdBvd/XGfv+DbW3v36+39Y8BnQ==
1220+
"@technote-space/worker-controller@^0.3.1":
1221+
version "0.3.1"
1222+
resolved "https://registry.yarnpkg.com/@technote-space/worker-controller/-/worker-controller-0.3.1.tgz#b6094b54d2a99c6d91575572cbb30846631d5255"
1223+
integrity sha512-MvkyevWznJb5kiXmloDK6ynav1nABUl3aO7ex052ZhkM9QY6VCdLinvY7c9fJ7/qzTZ4dJoPFHv7NkKM6QkXnw==
12241224

12251225
"@types/anymatch@*":
12261226
version "1.3.1"

0 commit comments

Comments
 (0)