File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -474,6 +474,12 @@ export class BlockNoteEditor<
474474 return ext ;
475475 }
476476
477+ if ( ! ext . plugin ) {
478+ throw new Error (
479+ "Extension should either be a TipTap extension or a ProseMirror plugin in a plugin property"
480+ ) ;
481+ }
482+
477483 // "blocknote" extensions (prosemirror plugins)
478484 return Extension . create ( {
479485 name : key ,
Original file line number Diff line number Diff line change @@ -116,7 +116,7 @@ export const getBlockNoteExtensions = <
116116 ret [ "nodeSelectionKeyboard" ] = new NodeSelectionKeyboardPlugin ( ) ;
117117
118118 const disableExtensions : string [ ] = opts . disableExtensions || [ ] ;
119- for ( const ext of Object . keys ( disableExtensions ) ) {
119+ for ( const ext of disableExtensions ) {
120120 delete ret [ ext ] ;
121121 }
122122
You can’t perform that action at this time.
0 commit comments