File tree Expand file tree Collapse file tree 2 files changed +15
-13
lines changed
Expand file tree Collapse file tree 2 files changed +15
-13
lines changed Original file line number Diff line number Diff line change 11/*******************************************************************************
22 * Copyright (c) 2017 Kiel University and others.
3- *
4- * This program and the accompanying materials are made
5- * available under the terms of the Eclipse Public License 2.0
6- * which is available at https://www.eclipse.org/legal/epl-2.0/
7- *
3+ *
4+ * This program and the accompanying materials are made
5+ * available under the terms of the Eclipse Public License 2.0
6+ * which is available at https://www.eclipse.org/legal/epl-2.0/
7+ *
88 * SPDX-License-Identifier: EPL-2.0
99 *******************************************************************************/
1010export default class ELK {
@@ -89,6 +89,7 @@ export default class ELK {
8989 }
9090
9191 terminateWorker ( ) {
92+ if ( this . worker )
9293 this . worker . terminate ( )
9394 }
9495
@@ -144,11 +145,11 @@ class PromisedWorker {
144145 }
145146
146147 terminate ( ) {
147- if ( this . worker . terminate ) {
148+ if ( this . worker ) {
148149 this . worker . terminate ( )
149150 }
150151 }
151-
152+
152153 convertGwtStyleError ( err ) {
153154 if ( ! err ) {
154155 return
@@ -167,5 +168,5 @@ class PromisedWorker {
167168 }
168169 delete err [ '__java$exception' ]
169170 }
170- }
171+ }
171172}
Original file line number Diff line number Diff line change 11/*******************************************************************************
22 * Copyright (c) 2019 TypeFox and others.
3- *
4- * This program and the accompanying materials are made
5- * available under the terms of the Eclipse Public License 2.0
6- * which is available at https://www.eclipse.org/legal/epl-2.0/
7- *
3+ *
4+ * This program and the accompanying materials are made
5+ * available under the terms of the Eclipse Public License 2.0
6+ * which is available at https://www.eclipse.org/legal/epl-2.0/
7+ *
88 * SPDX-License-Identifier: EPL-2.0
99 *******************************************************************************/
1010
@@ -116,6 +116,7 @@ export interface ELK {
116116 knownLayoutAlgorithms ( ) : Promise < ElkLayoutAlgorithmDescription [ ] >
117117 knownLayoutOptions ( ) : Promise < ElkLayoutOptionDescription [ ] >
118118 knownLayoutCategories ( ) : Promise < ElkLayoutCategoryDescription [ ] >
119+ terminateWorker ( ) : void ;
119120}
120121
121122export interface ELKConstructorArguments {
You can’t perform that action at this time.
0 commit comments