Commit fe31046
committed
Guard media insert with handleInsert and add debug logs
Prevent errors when inserting images into the editor by checking that the
handleInsert callback exists before calling it. The editor was failing to
insert images because handleInsert could be undefined; adding conditional
guards around double-click and insert-button code paths avoids runtime
exceptions. Also add temporary console.log statements to help debug what
assets and handleInsert look like during interactions.1 parent ddeaed2 commit fe31046
1 file changed
+7
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
650 | 650 | | |
651 | 651 | | |
652 | 652 | | |
653 | | - | |
| 653 | + | |
| 654 | + | |
654 | 655 | | |
655 | 656 | | |
656 | 657 | | |
| |||
696 | 697 | | |
697 | 698 | | |
698 | 699 | | |
699 | | - | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
700 | 705 | | |
701 | 706 | | |
702 | 707 | | |
| |||
0 commit comments