function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
RamaSubbaReddyRamaSubbaReddy 

Uncaught Error in $A.getCallback() [Cannot read property 'style' of null] after upgrading to spring 21

i am facing $A.getCallback() [Cannot read property 'style' of null] Error after upgrading my sandbox to spring 21.

Code block:
//To set the horizontal scroll bar at bottom 
if(totalrec.length < 15){            
   document.getElementById("Table").style.height = totalrec.length+5;
}
else
{
    document.getElementById("Table").style.height = "auto";
}
Above code block is working fine till winter 21 upgrade. Please suggest solution for this.

 
SwethaSwetha (Salesforce Developers) 
HI RamaSubbaReddy,
I have checked if there is any known issue for this in https://trailblazer.salesforce.com/issues_releases_view?release=230000000 but do not see any.
Can you share the complete reproducible code snippet that can be used to replicate this behavior?

Similar posts: https://developer.salesforce.com/forums?id=906F0000000kJQAIA2

Thanks
Sridhar Nanjappaiah 8Sridhar Nanjappaiah 8
I see this issue as reported before: https://trailblazer.salesforce.com/issues_view?id=a1p3A0000008gFMQAY&title=spring-17-cannot-read-property-sobjecttype-of-null-error-when-navigating-in-lightning