@@ -109,10 +109,6 @@ impl GridRevisionEditor {
109109 field_id : & str ,
110110 type_option_data : Vec < u8 > ,
111111 ) -> FlowyResult < ( ) > {
112- if type_option_data. is_empty ( ) {
113- return Ok ( ( ) ) ;
114- }
115-
116112 let result = self . get_field_rev ( field_id) . await ;
117113 if result. is_none ( ) {
118114 tracing:: warn!( "Can't find the field with id: {}" , field_id) ;
@@ -307,10 +303,6 @@ impl GridRevisionEditor {
307303 #[ tracing:: instrument( level = "debug" , skip_all, err) ]
308304 async fn update_field_rev ( & self , params : FieldChangesetParams , field_type : FieldType ) -> FlowyResult < ( ) > {
309305 let mut is_type_option_changed = false ;
310- if !params. has_changes ( ) {
311- return Ok ( ( ) ) ;
312- }
313-
314306 let _ = self
315307 . modify ( |grid| {
316308 let changeset = grid. modify_field ( & params. field_id , |field| {
@@ -334,11 +326,11 @@ impl GridRevisionEditor {
334326 }
335327 if let Some ( type_option_data) = params. type_option_data {
336328 let deserializer = TypeOptionJsonDeserializer ( field_type) ;
329+ is_type_option_changed = true ;
337330 match deserializer. deserialize ( type_option_data) {
338331 Ok ( json_str) => {
339332 let field_type = field. ty ;
340333 field. insert_type_option_str ( & field_type, json_str) ;
341- is_type_option_changed = true ;
342334 }
343335 Err ( err) => {
344336 tracing:: error!( "Deserialize data to type option json failed: {}" , err) ;
0 commit comments