File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,6 @@ abstract class MutableObject extends HashedObject {
2222 static prevOpsComputationLog = new Logger ( MutableObject . name , LogLevel . INFO ) ;
2323
2424 readonly _acceptedMutationOpClasses : Array < string > ;
25- readonly _supportsUndo : boolean ;
2625
2726 _boundToStore : boolean ;
2827
@@ -45,8 +44,6 @@ abstract class MutableObject extends HashedObject {
4544 constructor ( acceptedOpClasses : Array < string > , supportsUndo = false ) {
4645 super ( ) ;
4746
48- this . _supportsUndo = supportsUndo ;
49-
5047 if ( supportsUndo ) {
5148 if ( acceptedOpClasses . indexOf ( CascadedInvalidateOp . className ) < 0 ) {
5249 acceptedOpClasses . push ( CascadedInvalidateOp . className ) ;
@@ -72,6 +69,10 @@ abstract class MutableObject extends HashedObject {
7269 this . _externalMutationCallbacks = new Set ( ) ;
7370 }
7471
72+ supportsUndo ( ) {
73+ return this . _acceptedMutationOpClasses . indexOf ( CascadedInvalidateOp . className ) >= 0
74+ }
75+
7576 abstract mutate ( op : MutationOp ) : Promise < boolean > ;
7677
7778 // override if appropiate
@@ -400,7 +401,7 @@ abstract class MutableObject extends HashedObject {
400401
401402 flags . push ( 'mutable' ) ;
402403
403- if ( this . _supportsUndo ) {
404+ if ( this . supportsUndo ( ) ) {
404405 flags . push ( 'supports_undo' )
405406 }
406407
You can’t perform that action at this time.
0 commit comments