Cannot read properties of null (reading '0')

Greetings,

All my functions and the table working as expected however there is error “Cannot read properties of null (reading ‘0’)” keeps on thrown in the console. How do I solve the error shown in the console. I’m able to reproduce the same error using fiddle

Regards,
Harvindran

Hi @harvindran.chandrase

On the initialization changes (1st parameter) return null, so reading from changes at

let row = changes[0][0];
let col = this.propToCol(changes[0][1]);

produces the error. You can add an IF to run the code if changes are defined. Updated demo Edit fiddle - JSFiddle - Code Playground

1 Like