File tree Expand file tree Collapse file tree 1 file changed +12
-8
lines changed
packages/vtable-sheet/src/core Expand file tree Collapse file tree 1 file changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -46,14 +46,18 @@ export function getTablePlugins(
4646 ! enabledPluginsUserSetted ?. some ( module => module . module === HistoryPlugin )
4747 ) {
4848 const workbookHistory = vtableSheet . getWorkbookHistoryManager ( ) ;
49- plugins . push (
50- new HistoryPlugin ( {
51- enableCompression : false ,
52- onTransactionPushed : ( args : any ) => {
53- workbookHistory . recordTableTransaction ( { sheetKey : args ?. sheetKey , tx : args ?. tx } ) ;
54- }
55- } )
56- ) ;
49+ if ( typeof HistoryPlugin !== 'function' ) {
50+ console . warn ( 'HistoryPlugin is not available in @visactor/vtable-plugins' ) ;
51+ } else {
52+ plugins . push (
53+ new HistoryPlugin ( {
54+ enableCompression : false ,
55+ onTransactionPushed : ( args : any ) => {
56+ workbookHistory . recordTableTransaction ( { sheetKey : args ?. sheetKey , tx : args ?. tx } ) ;
57+ }
58+ } )
59+ ) ;
60+ }
5761 }
5862 if ( ! disabledPluginsUserSetted ?. some ( module => module . module === FilterPlugin ) ) {
5963 const userPluginOptions = enabledPluginsUserSetted ?. find ( module => module . module === FilterPlugin )
You can’t perform that action at this time.
0 commit comments