Commit 52e38e0
authored
fix: strip disabledReasons when saving blocks to backpack (#2680)
* refactor: extract cleanFlyoutInfo method in workspace-backpack
Extract the key-stripping logic from blockToJsonString into a reusable
cleanFlyoutInfo method. Also fix a potential null dereference when
Blockly.serialization.blocks.save returns null.
Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com
* fix: Strip the 'disabledReasons' property when saving blocks to the backpack.
Disabled blocks that are saved to the backpack retain their 'disabledReasons' property, which makes them impossible to take. Add 'disabledReasons' to the list of stripped keys and apply the stripping to blocks added via the 'Backpackable' interface ('addBackpackables').
Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com1 parent 1565867 commit 52e38e0
1 file changed
Lines changed: 45 additions & 24 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
467 | 467 | | |
468 | 468 | | |
469 | 469 | | |
470 | | - | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
471 | 473 | | |
472 | | - | |
473 | | - | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
474 | 482 | | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
475 | 489 | | |
476 | | - | |
477 | | - | |
478 | | - | |
479 | | - | |
480 | | - | |
481 | | - | |
482 | | - | |
483 | | - | |
484 | | - | |
485 | | - | |
486 | | - | |
487 | | - | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
488 | 513 | | |
489 | 514 | | |
490 | 515 | | |
491 | 516 | | |
492 | | - | |
493 | | - | |
494 | | - | |
495 | | - | |
| 517 | + | |
496 | 518 | | |
497 | 519 | | |
498 | 520 | | |
| |||
600 | 622 | | |
601 | 623 | | |
602 | 624 | | |
603 | | - | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
604 | 629 | | |
605 | 630 | | |
606 | 631 | | |
| |||
1033 | 1058 | | |
1034 | 1059 | | |
1035 | 1060 | | |
1036 | | - | |
1037 | | - | |
1038 | | - | |
1039 | | - | |
| |||
0 commit comments