File tree Expand file tree Collapse file tree 2 files changed +20
-14
lines changed Expand file tree Collapse file tree 2 files changed +20
-14
lines changed Original file line number Diff line number Diff line change 2
2
// Distributed under the terms of the Modified BSD License.
3
3
4
4
import { IIterator , iter , every } from '@lumino/algorithm' ;
5
- import { JSONExt , JSONObject } from '@lumino/coreutils' ;
6
5
import { Poll } from '@lumino/polling' ;
7
6
import { ISignal , Signal } from '@lumino/signaling' ;
8
7
@@ -257,12 +256,13 @@ export class KernelManager extends BaseManager implements Kernel.IManager {
257
256
258
257
if (
259
258
this . _models . size === models . length &&
260
- every ( models , x =>
261
- JSONExt . deepEqual (
262
- ( this . _models . get ( x . id ) as unknown ) as JSONObject ,
263
- ( x as unknown ) as JSONObject
264
- )
265
- )
259
+ every ( models , x => {
260
+ const existing = this . _models . get ( x . id ) ;
261
+ if ( ! existing ) {
262
+ return false ;
263
+ }
264
+ return existing . name === x . name ;
265
+ } )
266
266
) {
267
267
// Identical models list (presuming models does not contain duplicate
268
268
// ids), so just return
Original file line number Diff line number Diff line change 2
2
// Distributed under the terms of the Modified BSD License.
3
3
4
4
import { IIterator , iter , every } from '@lumino/algorithm' ;
5
- import { JSONExt , JSONObject } from '@lumino/coreutils' ;
6
5
import { Poll } from '@lumino/polling' ;
7
6
import { ISignal , Signal } from '@lumino/signaling' ;
8
7
@@ -267,12 +266,19 @@ export class SessionManager extends BaseManager implements Session.IManager {
267
266
268
267
if (
269
268
this . _models . size === models . length &&
270
- every ( models , x =>
271
- JSONExt . deepEqual (
272
- ( this . _models . get ( x . id ) as unknown ) as JSONObject ,
273
- ( x as unknown ) as JSONObject
274
- )
275
- )
269
+ every ( models , x => {
270
+ const existing = this . _models . get ( x . id ) ;
271
+ if ( ! existing ) {
272
+ return false ;
273
+ }
274
+ return (
275
+ existing . kernel ?. id === x . kernel ?. id &&
276
+ existing . kernel ?. name === x . kernel ?. name &&
277
+ existing . name === x . name &&
278
+ existing . path === x . path &&
279
+ existing . type === x . type
280
+ ) ;
281
+ } )
276
282
) {
277
283
// Identical models list (presuming models does not contain duplicate
278
284
// ids), so just return
You can’t perform that action at this time.
0 commit comments