ChangedEvent.obj returns null

Hi, I am using the following code :

var g$ = go.GraphObject.make;
var diagram = g$(go.Diagram, 'myDiagram', {
    nodeTemplateMap : diagramService.getNodeTemplateMap(),
    linkTemplate : diagramService.getLinkTemplate(),
    model : g$(go.GraphLinksModel, {
        linkFromPortIdProperty : "fromPort",
        linkToPortIdProperty : "toPort"
    }),
    initialContentAlignment : go.Spot.Center,
    allowDrop : true,
});

diagram.model.addChangedListener(function(e) {
    if (e.isTransactionFinished) {
        var tx = e.object;
        console.log(tx);
        if (tx instanceof go.Transaction && console) {
            console.log(tx.toString());
            tx.changes.each(function(c) {
            if (c.model) console.log("  " + c.toString());
        });
    }
)}

The issue is that console.log(tx) is always showing null, i.e, I am not able to get the Transaction from the ChangesEvent

Yes, there might not be a Transaction for a “Transaction” ChangedEvent, as documented at http://gojs.net/latest/api/symbols/ChangedEvent.html.

However the value of ChangedEvent.object will normally be a Transaction.