UndoManager Question

I have nested doc with Map inside a Map inside a Map, something like

theme: {
  common: {
     bg: 'white' 
  }
}

now I changed the bg from white to red, the undo manager.on “stack-item-added” spitted out 3 events for that one change. Is that expected?