File tree Expand file tree Collapse file tree 3 files changed +4
-14
lines changed Expand file tree Collapse file tree 3 files changed +4
-14
lines changed Original file line number Diff line number Diff line change @@ -531,11 +531,9 @@ export async function updateBlockFromServer(
531
531
block_id : block_id ,
532
532
isSaved : response_json . saved_successfully ,
533
533
} ) ;
534
- store . commit ( "setBlockImplementationError" , { block_id, hasError : false } ) ;
535
534
} )
536
535
. catch ( ( error ) => {
537
536
console . warn ( `Failed to update block ${ block_id } :` , error ) ;
538
- store . commit ( "setBlockImplementationError" , { block_id, hasError : true } ) ;
539
537
store . commit ( "setBlockNotUpdating" , block_id ) ;
540
538
} ) ;
541
539
}
Original file line number Diff line number Diff line change @@ -362,13 +362,6 @@ export default createStore({
362
362
] . filter ( ( item ) => ! refcodes . includes ( item . refcode ) ) ;
363
363
}
364
364
} ,
365
- setBlockImplementationError ( state , { block_id, hasError } ) {
366
- if ( hasError ) {
367
- state . block_implementation_errors [ block_id ] = true ;
368
- } else {
369
- delete state . block_implementation_errors [ block_id ] ;
370
- }
371
- } ,
372
365
} ,
373
366
getters : {
374
367
getItem : ( state ) => ( item_id ) => {
Original file line number Diff line number Diff line change @@ -266,12 +266,11 @@ export default {
266
266
});
267
267
},
268
268
getBlockDisplayType (block_id ) {
269
- if (this .$store .state .block_implementation_errors [block_id]) {
270
- return NotImplementedBlock;
271
- }
272
-
273
269
const block = this .blocks [block_id];
274
- if (! block || ! block .blocktype ) {
270
+ if (! (block .blocktype in this .$store .state .blocksInfos )) {
271
+ console .log (
272
+ ` Block with type ${ block .blocktype } does not have a valid blocktype or is not in blocksInfos.` ,
273
+ );
275
274
return NotImplementedBlock;
276
275
}
277
276
You can’t perform that action at this time.
0 commit comments