File tree Expand file tree Collapse file tree 1 file changed +20
-14
lines changed Expand file tree Collapse file tree 1 file changed +20
-14
lines changed Original file line number Diff line number Diff line change @@ -2418,25 +2418,31 @@ Entry.Utils.getObjectsBlocksBySceneId = _.memoize((sceneId) => {
24182418} ) ;
24192419
24202420Entry . Utils . getObjectsBlocksForEventThread = _ . memoize ( ( object ) => {
2421+ const nowScheduler = new Scheduler ( ) ;
24212422 const _typePicker = _ . partial ( _ . result , _ , 'type' ) ;
24222423 const job = new Promise ( ( resolve ) => {
2423- scheduler . run ( function * ( ) {
2424+ nowScheduler . run ( function * ( ) {
24242425 const result = [ ] ;
2425- let codes ;
2426- if ( object ) {
2427- codes = [ object ] ;
2428- } else {
2429- codes = Entry . container . objects_ ;
2430- }
2431- for ( const code of codes ) {
2432- let script = code . script ;
2433- if ( ! ( script instanceof Entry . Code ) ) {
2434- script = new Entry . Code ( script ) ;
2426+ try {
2427+ let codes ;
2428+ if ( object ) {
2429+ codes = [ object ] ;
2430+ } else {
2431+ codes = Entry . container . objects_ ;
24352432 }
2436- result . push ( script . getBlockListForEventThread ( true ) . map ( _typePicker ) ) ;
2437- yield ;
2433+ for ( const code of codes ) {
2434+ let script = code . script ;
2435+ if ( ! ( script instanceof Entry . Code ) ) {
2436+ script = new Entry . Code ( script ) ;
2437+ }
2438+ result . push ( script . getBlockListForEventThread ( true ) . map ( _typePicker ) ) ;
2439+ yield ;
2440+ }
2441+ resolve ( _ . flatten ( result ) ) ;
2442+ } catch ( e ) {
2443+ console . warn ( e ) ;
2444+ resolve ( _ . flatten ( result ) ) ;
24382445 }
2439- resolve ( _ . flatten ( result ) ) ;
24402446 } ) ;
24412447 } ) ;
24422448 return job ;
You can’t perform that action at this time.
0 commit comments